-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
28 lines (23 loc) · 770 Bytes
/
app.js
File metadata and controls
28 lines (23 loc) · 770 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
/**
* Created by Halil İbrahim ŞAFAK on 02/05/15.
*/
var express = require('express');
var bodyParser = require('body-parser');
var path = require('path');
var swig = require('swig');
require("./libs/DateLibrary");
require("./libs/StringLibrary");
var app = express();
app.set('port', 8080);
app.use(bodyParser.json(true));
app.use(express.static(path.join(__dirname, 'public')));
app.engine('html', swig.renderFile);
app.set('view engine', 'html');
app.set('views',__dirname + '/views');
app.set('view cache', false);
swig.setDefaults({ cache:false });
require('./controllers/ApiController')(app);
require('./controllers/SocketController');
app.listen(app.get('port'),function(){
console.log('Chat Server App is working on port:' + app.get('port'));
});