Skip to content

Instantly share code, notes, and snippets.

@oivoodoo
Created April 23, 2014 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oivoodoo/11214576 to your computer and use it in GitHub Desktop.
Save oivoodoo/11214576 to your computer and use it in GitHub Desktop.

Deploy to heroku.

NODE_ENV=production APP_NAME=task-management-app sh deploy.sh
gem install heroku
heroku apps:destroy --app $APP_NAME
heroku create $APP_NAME --buildpack https://github.com/oivoodoo/heroku-buildpack-nodejs-grunt.git
heroku config:set NODE_ENV=$NODE_ENV --app $APP_NAME
git push heroku master
...
grunt.registerTask('heroku:production' , 'build');
};
{
...
"dependencies": {
"gzippo": "~0.2.0",
"grunt": "~0.4.1",
"grunt-shell": "~0.6.4",
"bower": "~1.2.8",
"express": "~3.5.0",
...
},
"engines": {
"node": ">=0.8.0"
},
"scripts": {
"test": "grunt test",
"start": "node web.js"
}
}
web: npm start
var gzippo = require('gzippo');
var express = require('express');
var app = express();
app.use(express.logger('dev'));
app.use(gzippo.staticGzip("" + __dirname + "/dist"));
app.listen(process.env.PORT || 3003);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment