Skip to content

camaleonjs/camaleon-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

camaleon-api

Logo

npm

camaleon-api is a Restify abstraction written in TypeScript.

Installing

You can install camaleon-api with npm:

npm install camaleon-api

Using

Camaleon API gives you productivity building RESTFul APIs.

ApiStartup

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();

IController

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, {});
        });
    }
}

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%