-
Notifications
You must be signed in to change notification settings - Fork 39
/
subnode.js
28 lines (24 loc) · 844 Bytes
/
subnode.js
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
/**
* Subnodes is an open source project that enables people to easily set up portable access points for serving content.
* Author : Sarah Grant
* Github : http://github.com/chootka/subnodes
* License: AGPLv3 http://www.gnu.org/licenses/agpl-3.0.html
*/
/**
* Module dependencies.
*/
var express = require('express'),
app = express(),
http = require('http'),
server = http.createServer(app),
io = require('socket.io').listen(server);
app.root = __dirname;
app.set('port', process.env.PORT || 8080);
// create the application
require('./app/config')(app, express);
require('./app/server/router')(app);
require('./app/server/modules/chat')(io);
// boot up HTTP server on port 80
server.listen(app.get('port'), function () {
console.log('Express server listening on port ' + app.get('port'))
})