entity-routes logo
Docs

Introduction#

Motivation#

Basically this is a Node / Typescript route handler tightly coupled* with TypeORM entities.

I wanted to get rid of writing the same boring controllers again & again for each entities and I could not find a NodeJS project that would fit my needs : being simple enough not to require any configuration (or controllers), yet easily customizable when needed.

Main Features#

Perks#

  • 0 config required
  • Type-safe API
  • Almost complete code coverage (95%+)
  • Out-of-the-box support for Koa/Express (therefore Next, Nuxt) integrations and compatible and any other middleware-based framework using adapters
  • Everything (types included) is exported so you can use it your own way

Future#

entity-routes is tightly coupled with TypeORM for now. In the long-term I'd like to make it an ORM-independant library. Something like supporting ORM through different packages, like @entity-routes/typeorm, @entity-routes/mikro-orm, etc.

Same could be done for routers (@entity-routes/koa, @entity-routes/express), rather than use the current ContextAdapter.

Inspiration#

Inspired by an internal project made at ACSEO with ApiPlatform (Symfony/PHP)

Prev
Quick start
Next
Basic usage