Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 932 Bytes

File metadata and controls

26 lines (22 loc) · 932 Bytes

dev-journal

Two apps:

  • frontend/ — React + Vite + TypeScript + Tailwind
  • backend/ — Node + Express + TypeScript + Prisma + PostgreSQL

Backend setup

  1. cd backend
  2. copy .env.example.env and set DATABASE_URL and JWT_SECRET.
  3. Install deps: npm install
  4. Generate Prisma client: npm run prisma:generate
  5. Run migrations (creates DB tables): npm run prisma:migrate
  6. Start dev server: npm run dev
    • Server runs at http://localhost:4000 (default port)

Frontend setup

  1. cd frontend
  2. copy .env.example.env
  3. Install deps: npm install
  4. Start dev server: npm run dev
    • Frontend runs at http://localhost:5173 (Vite default)

Notes

  • Default API URL is VITE_API_URL in frontend/.env.
  • Auth uses JWT — token is returned on login and should be stored client-side (example stores it in localStorage).
  • Prisma schema is in backend/prisma/schema.prisma.