MRazvan / lib-http

Http server using lib-host, lib-intercept, lib-reflect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@mrazvan/lib-http

Library implementing a Runnable for HTTP servers. It is implemented to be used with lib-host. It is also using lib-intercept for handling routes, and lib-reflect for creating routes.

Short version: Allow implementing API's the way the project requires, meaning using any the framework for routing, any project structure, any coding practice. It provides reasonable defaults and a set of hook points to configure everything except the actual HTTP server.

Long version: TODO

Examples

Instalation

npm i @mrazvan/lib-http

Usage

const host = new Host() // lib-host host
host.addModule({
  init: (container: Container) {
    const srv1 = HTTPFactory.create(container);
    // const srv2 = HTTPFactory.create(container);
    // const srv3 = HTTPFactory.create(container);
    // .....
  }
})

TODO

README

About

Http server using lib-host, lib-intercept, lib-reflect

License:MIT License


Languages

Language:TypeScript 94.9%Language:JavaScript 5.1%