@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

    Install

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

    DownloadsWeekly Downloads

    9

    Version

    0.0.4

    License

    ISC

    Unpacked Size

    21.4 kB

    Total Files

    17

    Last publish

    Collaborators

    • ania-aexol
    • arturczemiel