From 4338f1aa8a654a7f49efdcf5441b00fe5292e1ab Mon Sep 17 00:00:00 2001 From: Dan Seripap Date: Fri, 19 Feb 2016 09:04:31 -0500 Subject: [PATCH] Configurable port --- src/app.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app.js b/src/app.js index 3b508d1..41bc917 100644 --- a/src/app.js +++ b/src/app.js @@ -1,14 +1,17 @@ +import _ from 'underscore'; import express from 'express'; import mustacheExpress from 'mustache-express'; import Io from 'socket.io'; import http from 'http'; import shortid from 'shortid'; -import _ from 'underscore'; -import Room from './room'; import favicon from 'serve-favicon'; import compression from 'compression'; import fs from 'fs'; +import Room from './room'; + +const $PORT = 3000; + const app = express(); const server = http.createServer(app); const io = Io(server); @@ -51,6 +54,6 @@ app.get('/:roomId', (req, res) => { return res.redirect('/'); }); -server.listen(3000, () => { - console.log('darkwire is online.'); +server.listen($PORT, () => { + console.log(`darkwire is online on port ${$PORT}.`); });