DockerRestApi/app.js
2019-09-20 18:54:00 +02:00

25 lines
614 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 restartRouter = require('./routes/restart');
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);
app.use('/restart', restartRouter);
module.exports = app;