DockerRestApi/app.js
2019-09-19 20:13:08 +02:00

22 lines
528 B
JavaScript

var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
var statusRouter = require('./routes/status');
var startRouter = require('./routes/start');
var app = express();
app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
app.use('/status', statusRouter);
app.use('/start', startRouter);
module.exports = app;