DockerRestApi/app.js

26 lines
614 B
JavaScript
Raw Permalink Normal View History

2019-09-19 16:07:12 +00:00
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');
2019-09-20 16:54:00 +00:00
var restartRouter = require('./routes/restart');
2019-09-19 18:13:08 +00:00
2019-09-19 16:07:12 +00:00
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);
2019-09-20 16:54:00 +00:00
app.use('/restart', restartRouter);
2019-09-19 18:13:08 +00:00
2019-09-19 16:07:12 +00:00
module.exports = app;