npm.io
5.3.21 • Published 6 years ago

@furystack/http-api

Licence
GPL-2.0
Version
5.3.21
Deps
7
Size
226 kB
Vulns
1
Weekly
0
DeprecatedThis package is deprecated

@furystack/http-api

Usage example

const i = new Injector()
i.useHttpApi({
  /** custom http settings */
})
  .useHttpAuthentication({
    /** custom auth settings */
  })
  .addHttpRouting(req => {
    /** custom logic to resolve action(s) from the incoming request */
  })
  .useDefaultLoginRoutes() // register '/login', '/currentUser' and '/logout' actions
  .listenHttp() // start listening