A full-stack application with backend and frontend running concurrently.
- Node.js v14 or newer
- npm (comes with Node.js)
From the project root directory, run:
npm install
This will:
- Install
concurrently
in the root. - Automatically
cd backend && npm install
- Then
cd frontend && npm install
To start both backend and frontend in development mode:
npm run dev
- Backend: runs in watch mode (reloads on changes).
- Frontend: runs Vite/dev server (with hot-reload).
Build only the frontend:
npm run build-frontend
This outputs optimized assets to frontend/dist
.
To serve the built frontend and start the backend:
npm run host
- Backend: starts in dev mode on port 8000 (default).
- Frontend: serves the built files via Vite preview.
-
Local machine: Open your browser at http://localhost:8000/
-
From another device on your network: After running
npm run host
, look in the console for a line like:[1] ➜ Network: http://192.168.1.42:8000/
Replace
192.168.1.42
with whatever IP is shown. Then point the other device’s browser to that URL.
Script | Description |
---|---|
npm run postinstall |
Installs both backend & frontend dependencies automatically |
npm run dev |
Runs backend + frontend in parallel for development |
npm run dev-backend |
Runs only the backend in dev mode |
npm run dev-frontend |
Runs only the frontend in dev mode |
npm run build-frontend |
Builds frontend for production |
npm run serve |
Serves both backend & built frontend in parallel |
npm run host |
Builds frontend then serves backend & frontend preview |
ISC