Skip to content

dchekanov/toolkit

Repository files navigation

This package is a merged, refactored, and extended continuation of @keleran/orm and @keleran/routing.

It provides a few essential building blocks for Node.js web applications:

  • CodedError - an Error with a mandatory code and optional metadata.
  • HttpError - a CodedError with a mandatory HTTP status code.
  • Db - query a PostgreSQL database using MongoDB-inspired syntax or raw SQL.
  • Model - define business logic entities as classes, persist instances with Db.
  • ModelLinker - simplify getting referenced model instances.
  • RequestHandler - define Express request handler.
  • RouterCodegen - organize routing using a file system directory tree.

Usage guidelines and examples can be found in the source code and test files.

While you're welcome to use this code in your own projects, the primary goal of publishing this package is to make it easier for the author to maintain his closed-source applications. This means that the code will remain highly opinionated, simplistic, and prone to sudden breaking changes.

About

Building blocks for Node.js web applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors