@pfc/http-adapter
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

HTTP Adapter

Koa-based library provides the necessary framework for Query Side services to be created.

Requirements

  • Typescript
  • Koa
  • Pino (Logger)

Setup

To install, use the file pro package.json option in the project:

  "dependencies": {
    "http-adapter": "file:../../libs/http-adapter",
    ...
  }

How to Use

To use it, you need to create a Mapper of the routes and functions to be executed:

import { HttpAdapter } from "http-adapter";

const MyQueryMapper = {

  "/myroute/": MyCallableFunction,

};

HttpAdapter({
  QueryMapper: MyQueryMapper,
}).listen(8080);

Note: All routes will be mapped and built using the GET method.

Readme

Keywords

none

Package Sidebar

Install

npm i @pfc/http-adapter

Weekly Downloads

1

Version

1.0.9

License

ISC

Unpacked Size

18.8 kB

Total Files

20

Last publish

Collaborators

  • lucas.biason.fdte
  • cesar.duarte
  • mateus.augusto
  • gustavo_fdte