keeper/keeper-server.js
Martin Donnelly 25d2a3a068 fixing build
2016-04-13 14:38:43 +01:00

33 lines
827 B
JavaScript

var express = require('express'), path = require('path'), http = require('http'),
favicon = require('serve-favicon'),
logger = require('morgan'),
cookieParser = require('cookie-parser'),
bodyParser = require('body-parser'),
keeper = require('./server/keeper')
;
var app = express();
app.set('port', process.env.PORT || 8026);
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'dist')));
app.use('/', keeper);
/**
* create the server
*/
app.listen(app.get('port'), function () {
console.log('Keeper Server listening on ' + app.get('port'));
});/**
* Created by Martin on 22/02/2016.
*/