mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 18:54:52 +00:00
Configurable port
This commit is contained in:
parent
6ec8d9c5a0
commit
4338f1aa8a
11
src/app.js
11
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}.`);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user