hyrest-express
v0.1.6
Published
A hybrid REST library for the frontend and backend. Express middleware package.
Downloads
3
Maintainers
Readme
hyrest-express
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.