JSPM

@kronos-integration/service-http

10.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2343
  • Score
    100M100P100Q112480F
  • License BSD-2-Clause

http server

Package Exports

  • @kronos-integration/service-http

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kronos-integration/service-http) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

ServiceHTTP

Extends Service

HTTP server

Properties

  • server http.Server only present if state is running

extendetName

Returns string name with url

endpointFactoryFromConfig

on demand create RouteSendEndpoint´s

Parameters

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

name

Returns string 'http'

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 {})
    • options.path string url path defaults to endpoint name

authenticate

check sec-websocket-protocol header for presence of 'access_token' and the token

Parameters

  • service Service
  • request any

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