amaui API
API
MIT license
Production ready
100% test cov
Nodejs
Very simple code
Modern code
Junior friendly
Typescript
Made with :yellow_heart:
Getting started
Add
yarn add @amaui/api
Use
import express from 'express';
import { Route, Method, IRouteClassInstance, Routes } from '@amaui/api';
class Base implements IRouteClassInstance {
public response(req: express.Request, response: express.Response, options: { method: 'json' | 'send', type: 'application/json', }) { return ...; }
public error(req: express.Request, error: Error) { return ...; }
}
@Route(
'/a',
method
)
class A extends Base {
@Method(
'get',
'/a',
method1
)
public a() { }
}
const app = express();
Routes([A], app);
Dev
Install
yarn
Test
yarn test
Prod
Build
yarn build