-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathstart.js
More file actions
34 lines (25 loc) · 762 Bytes
/
start.js
File metadata and controls
34 lines (25 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* Sovryn Node
*/
const express= require('express');
const app = express();
const http = require('http').createServer(app);
const io = require('socket.io')(http);
import mainController from './controller/main';
import conf from './config/config';
const _oldConsole = console;
global.console = {
..._oldConsole,
log: (...args) => {
_oldConsole.log(`${new Date().toISOString()}:: `, ...args);
},
error: (...args) => {
_oldConsole.error(`${new Date().toISOString()}:: `, ...args);
},
}
app.use('/', express.static('public/dist'));
http.listen(conf.serverPort, () => {
console.log('listening on *:'+conf.serverPort);
});
console.log("Hola. Starting the app on "+process.argv[2]);
mainController.start(io);