blob: d437ead976fe8696794cfad0658b07be7e236433 (
plain)
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
|
var express = require('express'),
path = require('path'),
config = require('./config/config.js')
var app = express();
app.set('views',path.join(__dirname,'views'));
app.engine('html',require('hogan-express'));
app.set('view engine','html');
app.use(express.static(path.join(__dirname,'views')));
app.set('port',process.env.PORT||4000);
//Setting config
app.set('host',config.host);
//Routing
require('./routes/routes.js')(express,app);
//Socket IO
var server = require('http').createServer(app);
var io = require('socket.io')(server);
server.listen(app.get('port'),function(){
console.log('eSim Runing on port : '+app.get('port'));
})
|