triggers-service
Version:
Service to list and activate Octoblu triggers within running flows
31 lines (22 loc) • 778 B
text/coffeescript
expressOctoblu = require 'express-octoblu'
MeshbluAuth = require 'express-meshblu-auth'
Router = require './router'
multer = require 'multer'
debug = require('debug')('triggers-service:server')
class Server
constructor: (options)->
{ , , } = options
{ } = options
address: =>
.address()
run: (callback) =>
meshbluAuth = new MeshbluAuth
app = expressOctoblu({ , , bodyLimit: '50mb' })
app.use meshbluAuth.auth()
app.use multer().any()
router = new Router {, meshbluAuth}
router.route app
= app.listen , callback
stop: (callback) =>
.close callback
module.exports = Server