-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
22 lines (16 loc) · 653 Bytes
/
app.js
File metadata and controls
22 lines (16 loc) · 653 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
var express = require('express');
var app = express();
var http = require('http');
var server = http.Server(app);
exports.io = require('socket.io')(server);
var gameServer = require('./server/server.js');
var port = process.env.PORT || 80;
app.use('/css', express.static(__dirname + '/css'));
app.use('/client', express.static(__dirname + '/client'));
app.use('/shared', express.static(__dirname + '/shared'));
app.use('/resources', express.static(__dirname + '/resources'));
app.use('/tools', express.static(__dirname + '/tools/tools.html'));
server.listen(port);
app.get('/', function (req, res) {
res.sendFile(__dirname + '/index.html');
});