DEV Community

zintrust Zin
zintrust Zin

Posted on Edited on

From Zero to a Running API in Minutes

 We've all been there. You have an idea, you open a fresh folder, and the next three hours go to config files, picking a router, and fighting an ORM. By the time it all works, the excitement's gone.

I wanted the first hour to go the other way. Here's the full setup for a ZinTrust API:

npm install -g @zintrust/core
zin new my-app
cd my-app
zin add db:sqlite
zin start
Enter fullscreen mode Exit fullscreen mode

That's it. New projects come with a .env that already has sensible defaults (HOST=localhost, PORT=7777, LOG_LEVEL=debug), so you're writing code before you ever touch config.

From there you can:

  • Define routes with Router.get, Router.post and friends
  • Group related routes and generate resource routes
  • Define models with Model.define
  • Validate input with Schema and Validator

Use SQLite while you're still figuring things out. When you're ready for production, switch to Postgres or MySQL with another adapter.

Speed matters most at the start, when you're still learning what the product should be. Pick tools that keep that first hour simple.

Give it a spin: npm install -g @zintrust/core && zin new my-app

What does your usual project setup look like? I'd love to hear it in the comments.

Top comments (0)