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;