pluginservice/index.js
2019-08-15 11:13:26 +02:00

15 lines
410 B
JavaScript

const express = require('express')
const app = express()
// if the content-type is application/json, the incoming POST body is parsed automatically
app.use(express.json());
// connect the plugin(s)
app.use('/plugin', require('./plugin'))
// catch 404 and forward to error handler
const createError = require('http-errors')
app.use(function(req, res, next) { next(createError(404)) })
module.exports = app