keeper/keeper-server.js

33 lines
827 B
JavaScript
Raw Normal View History

2016-03-02 13:53:28 +00:00
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')));
2016-03-02 13:53:28 +00:00
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.
*/