1.0.1 • Published 4 years ago

dpd-router-middleware v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Simple router middleware for deployd

Installation

$ npm install dpd-router-event dpd-router-middleware dpd-event-extension --save

Usage

app.js:

require('dpd-router-middleware')( require('deployd/lib/router'), 'middleware')  // <----- add this
try {
      var deployd = require('deployd')
      var dpd = deployd({port:3000});
      dpd.listen();
} catch(e) {
      console.error(err.toString()) // becomes exception in analytics 
}

NOTE:

  • middleware as used above can be anything but must be the name of the router event resource;
  • module dpd-event-extension is needed only to ensure that require is available within the events.

Now, open dashboard and create a Router Event with the name given above (middleware or whatever you put there)

1.0.1

4 years ago

1.0.0

7 years ago