pluginservice/index.js
Daniel Brahneborg c49cd95a98 plugin2: counter
2019-08-21 07:33:14 +02:00

16 lines
452 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'))
app.use('/plugin2', require('./plugin2'))
// catch 404 and forward to error handler
const createError = require('http-errors')
app.use(function(req, res, next) { next(createError(404)) })
module.exports = app