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); |