@aexol/syncano-middleware-in-socket
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

name

Run middlewares from socket.

Description

Run middlewares defined in socket.yml.

Synopsis

Example usage:

import serve, {response} from '@aexol/syncano-middleware'
import {fromSocket} from '@aexol/syncano-middleware-in-socket'

export default ctx => serve(ctx, fromSocket(async (ctx, syncano) => {
  return response.json({})
}))

API

fromSocket(fn, [opts]) ⇒ HandlerFn

Kind: global function
Export:

Param Type Description
fn HandlerFn

next function in chain

[opts] Object

extra options

[opts.paths] PathsType

socket info search override

Package Sidebar

Install

npm i @aexol/syncano-middleware-in-socket

Weekly Downloads

1

Version

0.0.4

License

ISC

Unpacked Size

21.4 kB

Total Files

17

Last publish

Collaborators

  • aexol-office
  • arturczemiel
  • ania-aexol