Skip to content

nirnejak/typescript-node-starter

Repository files navigation

Typescript Node Starter

Node.js and Fastify project starter using TypeScript

Note: Need to configure .env file to use local server


Additional Packages Used

  • drizzle - for database ORM
  • colorette - for styling console output
  • date-fns - for date operations and formatting
  • heapdump - for getting dump of the current memory heap

Available Scripts

Install Dependencies

bun install

Setup Pre-commit

bun run prepare

Check ESLint issues

bun run lint

Format with Prettier

bun run format

Start Development Server

bun run develop

Create Migrations

bun run db:generate

Run Migrations

bun run db:migrate

Push Migration changes

bun run db:push

Build for Production

bun run build

Start Production Server

bun start

Docker Config

Build Image

docker build

Run Image

docker run -p 5000:5000 <image-id>

Development Setup

  • VS Code - Install the recommended extensions
  • Volta - For managing node versions

Guides


Next Steps