Configurable port

This commit is contained in:
Dan Seripap 2016-02-19 09:04:31 -05:00
parent 6ec8d9c5a0
commit 4338f1aa8a

View File

@ -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}.`);
});