Models
Very simple code Modern code Junior friendly Typescript Made with 💛
yarn add @onesy/models
import express from 'express';
import { Query, Response } from '@onesy/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