summaryrefslogtreecommitdiff
path: root/app.js
blob: 0a72ee5b5e665de2d1cb489d33bdfa4c0254e51d (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
29
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);

//Socket IO
var server = require('http').createServer(app);
var io = require('socket.io')(server);
var fs = require('fs');
var exec = require('child_process').exec;

//Routing
require('./routes/routes.js')(express,app,io,fs,exec);

server.listen(app.get('port'),function(){
        console.log('eSim Runing on port : '+app.get('port'));
})