Models
Very simple code Modern code Junior friendly Typescript Made with 💛
yarn add @amaui/models
import express from 'express';
import { Query, Response } from '@amaui/models';
async function route(req: express.Request, res: express.Response) {
const query = Query.fromRequest(req);
const response = await todoCollection.searchMany(query);
return res.status(200).json(Response.fromQuery(response));
}
// etc.
Install
yarn
Test
yarn test
Build
yarn build