Printer Logo

Printer

Creating CRUD API Routes

The CRUD command creates new API routes based around a Prisma model. For example running “printer crud account” will generate the routes create, update, list, get, delete with the Prisma model “Account” binded to it.

λ Usage
λ printer crud [model name]
λ Example Usage
λ printer crud user
λ ...
λ This command then creates
λ app/api/account/route.tsx

These are samples of the auto generated code.