fixing heroku

master
Matthew Huntington 10 years ago
parent 8038db7d63
commit 01ba7aa3fe

@ -2,7 +2,7 @@
"name": "workspace", "name": "workspace",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "index.js", "main": "server.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },

@ -1,10 +1,12 @@
var express = require('express'); var express = require('express');
var app = express(); var app = express();
var port = process.env.PORT || 3000;
app.get('/', function(req, res){ app.get('/', function(req, res){
res.send('works'); res.send('works');
}) })
app.listen(3000, function(){ app.listen(port, function(){
console.log('listening on port ' + process.env.PORT); console.log('listening on port ' + process.env.PORT);
}) })
Loading…
Cancel
Save