mirror of
https://github.com/wassname/HackFlowy.git
synced 2026-09-12 12:03:26 +08:00
Add option to override port configuration with environment variable: PORT
This commit is contained in:
@@ -18,3 +18,4 @@ npm-debug.log
|
|||||||
node_modules
|
node_modules
|
||||||
|
|
||||||
*.sqlite
|
*.sqlite
|
||||||
|
*.env
|
||||||
|
|||||||
@@ -16,8 +16,9 @@ app.configure(function() {
|
|||||||
app.use(express.errorHandler({dumpExceptions: true, showStack: true}));
|
app.use(express.errorHandler({dumpExceptions: true, showStack: true}));
|
||||||
});
|
});
|
||||||
|
|
||||||
server.listen(config.get('port'), function() {
|
var port = process.env.PORT || config.get('port');
|
||||||
console.log( 'Express server listening on port %d in %s mode', config.get('port'), app.settings.env );
|
server.listen(port, function() {
|
||||||
|
console.log( 'Express server listening on port %d in %s mode', port, app.settings.env );
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/tasks', function(req,res){
|
app.get('/tasks', function(req,res){
|
||||||
|
|||||||
Reference in New Issue
Block a user