seneca-web-adapter-express-dd

1.0.3 • Public • Published

Seneca Web Adapter Connect

Build Status Coverage Status

This is an adapter for seneca-web using express.

Installation

A peer dependency has been specified for seneca-web And of course express must be present for this to work at all.

npm install --save express
npm install --save seneca-web
npm install --save seneca-web-adapter-express

##UPD

Added ability to use plugin with express requests and seneca messages.

Usage

Please refer to the seneca-web documentation on how to load routes.

You can require this module as the adapter when using the SenecaWeb plugin

const Seneca = require('seneca')
const SenecaWeb = require('seneca-web')
const Express = require('express')
const seneca = Seneca()
seneca.use(SenecaWeb, {
  context: Express(),
  adapter: require('seneca-web-adapter-express')
})
seneca.ready(() => {
  const app = seneca.export('web/context')()
  app.listen(3000)
})

Package Sidebar

Install

npm i seneca-web-adapter-express-dd

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • david.donn