For this home assignment I've started with Express & React in JS ( as written in requirements ), but then after asking for details in chat I've decided to replace stack to Fastify + React + Vite + Typescript ( as Fastify is much better from terms of performance and support ). It was also decided to serve static within Fastify, which is opinionated, but saves us extra service for frontend.
REC-20231230124120.mp4
docker compose up
That should build app in prod mode and run it along with mongodb locally with Docker.
- Node.js 20+
npm install
cd backend
npm install
cp .env.example .env
cd ..
cd frontend
npm install
Run mongodb instance and populate backend/.env
file
In separate shell sessions run:
cd backend && npm run dev
cd frontend && npm run dev
And visit localhost:3000
in browser.