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 stopRouter = require('./routes/stop'); 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('/stop', stopRouter); module.exports = app;