voterunner

quick and dirty votes and discussions
git clone https://git.ce9e.org/voterunner.git

commit
c5cfd7a0c4314376eb55d5bcae92ad693fc5fce6
parent
871a6e912ec284174b98e7edc0fda0918f4a18a2
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2016-09-11 08:56
allow to set host

See https://nodejs.org/dist/latest-v4.x/docs/api/http.html#http_server_listen_port_hostname_backlog_callback

Diffstat

M app.js 5 +++--

1 files changed, 3 insertions, 2 deletions


diff --git a/app.js b/app.js

@@ -19,12 +19,13 @@ var log4js = require('log4js');
   19    19 
   20    20 var DATABASE_URL = process.env.DATABASE_URL;
   21    21 var PORT = process.env.PORT || 5000;
   -1    22 var HOST = process.env.HOST || 'localhost';
   22    23 
   23    24 var log = log4js.getLogger();
   24    25 
   25    26 app.use(express.static('static'));
   26    -1 server.listen(PORT, function() {
   27    -1 	log.info('Listening on ' + PORT);
   -1    27 server.listen(PORT, HOST, function() {
   -1    28 	log.info('Listening on ' + HOST + ':' + PORT);
   28    29 });
   29    30 
   30    31 var parseDatabaseUrl = function(databaseUrl) {