Skip to content

Instantly share code, notes, and snippets.

@kikill95
Last active January 14, 2017 10:35
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 kikill95/12a6301244e67678a0475f8abd640a2a to your computer and use it in GitHub Desktop.
Save kikill95/12a6301244e67678a0475f8abd640a2a to your computer and use it in GitHub Desktop.
Heroku
heroku login
heroku create
// heroku config:set NPM_CONFIG_PRODUCTION=false
git push heroku master
heroku open
var app = require('express')();
var http = require('http').Server(app);
app.get('/', function(req, res) {
res.sendFile(__dirname + '/dist/index.html');
});
http.listen(process.env.PORT || 3000, function() {
console.log('Listening on:' + (process.env.PORT || 3000));
});
{
"name": "mockupdec",
"version": "0.0.1",
"scripts": {
"postinstall": "node_modules/.bin/gulp"
},
"license": "ISC",
"dependencies": {
"express": "^4.14.0"
}
}
web: node index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment