camaleon-api
is a Restify abstraction written in TypeScript.
You can install camaleon-api
with npm:
npm install camaleon-api
Camaleon API gives you productivity building RESTFul APIs.
import { ApiStartup } from "camaleon-api";
import { HomeController } from "./controllers/home.controller";
const startup = new ApiStartup({
port: 3000,
controllers: [new HomeController()],
beforeConfigure: (server) => {
},
afterConfigure: (server) => {
}
});
startup.Run();
import * as restify from "restify";
import { IController } from "camaleon-api";
export class HomeController implements IController {
register(server: restify.Server): void {
server.get("/", async (req, res, next) => {
res.send(200, {});
});
}
}