Skip to content

TheDeadcoder/nodejs-init

Repository files navigation

Node Starter — Backend Template

A minimal Node.js + TypeScript backend template using Express, Drizzle ORM (Postgres), Supabase auth, Zod validation and OpenAPI docs generated from Zod schemas.

Install the dependencies

npm install

Required entries ion the .env file

  • DATABASE_URL
  • SUPABASE_URL
  • SUPABASE_ANON_KEY
  • NODE_ENV (set it to 'local' for local testing)
  • PORT
  • RATE_LIMIT_WINDOW_MS
  • RATE_LIMIT_MAX_REQUESTS

Guide for development

Database

  • See the src/models directory and define your table structure there
  • Reflect the changes in the cloud by runnning the file db.sh

Define Corresponding Schema

  • Define schema for the table in src/schemas directory
  • Register your schema for swagger

Make the API endpoints

make the controllers

Service/ helper functions

  • define the Service/helper functions in the src/services section

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors