hyrest-express
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

hyrest-express

npm pipeline status coverage report

Hyrest is a hybrid REST framework for both the client and the server.

This is the express middleware package.

Connect your hyrest controllers to Express and server them as a REST API.

Usage

Use the hyrest middleware to connect your controllers to express:

import { hyrest } from "hyrest-express";
import * as Express from express;
import * as BodyParser from "body-parser";
import { UserController } from "./user-controller";
import { GameController } from "./game-controller";
 
const app = Express();
app.use(Bodyparser.json());
app.use(hyrest(
    new UserController(),
    new GameController(),
));
 
app.listen(3000);

Everything else happens automatically.

Resources

Package Sidebar

Install

npm i hyrest-express

Weekly Downloads

0

Version

0.1.6

License

MIT

Unpacked Size

35.3 kB

Total Files

11

Last publish

Collaborators

  • prior99