Node.js web application to start and stop AWS EC2 instances
express - web application framework for node
$ express --sessions --css less --hogan --force nodejs-ec2-launcher
hogan-express - Hogan.js, Mustache template engine for express 3.x. Support partials and layout.
$ npm install hogan-express --save
Passport - Simple, unobtrusive authentication for Node.js.
$ npm install passport --save
Passport-BrowserID - Passport strategy for authenticating with Mozilla Persona (formerly known as BrowserID).
$ npm install passport-browserid --save
$ npm install aws-sdk --save
zepto.js - a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API.
Font Awesome - The iconic font designed for Bootstrap.
$ foreman start
Point your favourite browser to http://localhost:3000/.
Default PORT is 3000
. To change create .env
file with e.g. PORT=3001
.
Environment variables, e.g. via .env
:
PORT=3000
PERSONA_AUDIENCE=http://localhost:3000
AWS_ACCESS_KEY_ID=[AWS_ACCESS_KEY_ID]
AWS_SECRET_ACCESS_KEY=[AWS_SECRET_ACCESS_KEY]
AWS_REGION=[AWS_REGION]
PERSONA_USERS_INSTANCES={"[email protected]":["i-ab12cde1"]}
Install the Heroku Toolbelt - everything you need to get started using heroku.
Authenticate/ login: heroku login
Install heroku-config, a plugin for the heroku
CLI that makes it easy to push or pull your application’s config environment vars, from or into your local .env
file.
$ heroku plugins:install git://github.com/ddollar/heroku-config.git
Create a .env
file with your project configuration - see above.
Next, deploy the application to Heroku.
Create the app: heroku create
Push your local environment file to Heroku: heroku config:push
Deploy the code: git push heroku master