@kronos-integration/service-koa

8.0.0 • Public • Published

Build Status codecov.io Commitizen friendly downloads GitHub Issues Greenkeeper Known Vulnerabilities License minified size npm semantic-release styled with prettier

kronos-service-koa

koa backed http server

API

Table of Contents

ServiceKOA

Extends Service

HTTP server with koa

Parameters

  • args ...any

Properties

  • server http.Server only present if state is running
  • koa koa

endpointFactoryFromConfig

on demand create RouteSendEndpoint´s

Parameters

Returns Class RouteSendEndpoint if path is present of name starts with '/'

name

Returns string 'koa'

HTTPEndpoint

Extends SendEndpoint

Endpoint to link against a http route

Parameters

  • name string endpoint name
  • owner Object owner of the endpoint
  • options Object (optional, default {})

WSEndpoint

Extends SendEndpoint

Endpoint to link against a websocket route

Parameters

  • name string endpoint name
  • owner Object owner of the endpoint
  • options Object (optional, default {})

CTXInterceptor

Extends Interceptor

extracts params form request body

name

Returns string 'ctx-body-param'

CTXBodyParamInterceptor

Extends Interceptor

extracts params form request body

name

Returns string 'ctx-body-param'

CTXJWTVerifyInterceptor

Extends Interceptor

only forward requests if a valid jwt token is present

name

Returns string 'ctx-jwt-verify'

install

With npm do:

npm install kronos-service-koa

license

BSD-2-Clause

Readme

Keywords

Package Sidebar

Install

npm i @kronos-integration/service-koa

Weekly Downloads

69

Version

8.0.0

License

BSD-2-Clause

Unpacked Size

20.3 kB

Total Files

9

Last publish

Collaborators

  • arlac77
  • darlenya