apeman-middleware-sse
apeman middleware package for sse
Installation
$ npm install apeman-middleware-sse --save
Usage
create an middleware instance and attach to server settings like $api
of apeman projects.
Apemanfile.js
/** This is an example Apemanfile to use apeman-middleware-sse */ 'use strict' const co = const asleep = moduleexports = $pkg: /* ... */ $api: /* ... */ $serverMiddlewares: '/sse/bomb'
Signature
apemanMiddlewareSse(pattern, handler, options) -> function
Create an middleware function
Args
Name | Type | Default | Description |
---|---|---|---|
pattern | string | URL pattern to apply proxy. | |
handler | function | Handler function for each client | |
options | Object | {} | Optional settings |
License
This software is released under the MIT License.