Skip to content

khotei/-1st

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Setup

This guide provides the essential steps to set up and start developing the project.

Requirements

  • Bun (JavaScript runtime and package manager)
  • Neon account for PostgreSQL database

Toolchain

Setup Instructions

1. Install Bun

brew install oven-sh/bun/bun

2. Install Dependencies

bun bootstrap

3. Configure Environment Variables

  • Development:
cp .env.example .env
  • Testing:
cp .env.example .env.test

4. Database Setup

  • Create a database at Neon Console.
  • Edit .env and set the DATABASE variable with your Neon connection string.
  • Apply migrations:
    bun run --filter "@1st/database" db:migrate
  • Seed database (optional):
    bun run --filter "@1st/database" db:seed
  • Reset database (optional):
    bun run --filter "@1st/database" db:reset

Development

Start all apps in dev mode:

bun run --filter='./apps/*' dev

Start api in dev mode:

bun run --filter "@1st/api" dev

Start web in dev mode:

bun run --filter "@1st/web" dev

Production

All At Once

  1. Build all apps
   bun run --filter='./apps/*' build
  1. Start all apps in prod mode:
bun run --filter='./apps/*' start

Individual Run

  1. Start api in prod mode:
bun run --filter "@1st/api" start
  1. Build web
bun run --filter "@1st/web" build
  1. Start web in prod mode:
bun run --filter "@1st/web" start

Releases

No releases published

Packages

No packages published