initial code commit

This commit is contained in:
Darren Swan
2019-02-01 22:35:06 -06:00
parent 923711ac6a
commit 0d98e01bc3
5 changed files with 59 additions and 2 deletions

15
server/server.js Normal file
View File

@ -0,0 +1,15 @@
var StaticServer = require('./static-server');
var expressWs = require('express-ws');
var app = require('express')();
expressWs(app);
var staticServer = new StaticServer();
app.use('/', staticServer);
var port = process.env.PORT || 8080
app.listen(port, function () {
console.log('Open MCT hosted at http://localhost:' + port);
});

11
server/static-server.js Normal file
View File

@ -0,0 +1,11 @@
var express = require('express');
function StaticServer() {
var router = express.Router();
router.use('/', express.static(__dirname + '/..'));
return router
}
module.exports = StaticServer;