DockerRestApi/app.js

23 lines
528 B
JavaScript
Raw 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-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-19 18:13:08 +00:00
2019-09-19 16:07:12 +00:00
module.exports = app;