Instructions to run the frontend and backend (dev and production) for this repository.
This project runs a single Node/Express server that serves both the API and the client app. During development the server starts Vite in middleware mode so one command runs both the frontend and backend together. The client app is located in the client/ folder and Vite's build output is placed under dist/public (served by the server in production).
- Node.js (v18+ recommended)
- npm (or yarn/pnpm)
From the project root run:
npm install
(or yarn / pnpm install if you prefer)
The repository includes a dev script in package.json, but the script sets environment variables using Unix syntax which may not work on Windows shells. The server entrypoint is server/index.ts and uses tsx for running TypeScript directly.
Choose one of the options below depending on your shell.
- Windows (cmd.exe):
set NODE_ENV=development&& npx tsx server/index.ts
- PowerShell:
$env:NODE_ENV = "development"; npx tsx server/index.ts
- WSL, Git Bash, macOS, Linux (POSIX shells):
NODE_ENV=development npx tsx server/index.ts
Notes:
- The dev server will start Express and mount Vite middleware so the client (React) will be served via the same port as the API.
- Default port is 5000 (see Environment Variables below).
- Build the client and bundle the server:
npm run build
This runs Vite to build the client into dist/public and bundles the server entrypoint into dist/index.js.
- Run the production server. Because the
startscript inpackage.jsonuses Unix-style env var syntax, use one of the commands below depending on your shell:
- Windows (cmd.exe):
set NODE_ENV=production&& set PORT=5000&& node dist/index.js
- PowerShell:
$env:NODE_ENV = "production"; $env:PORT = "5000"; node dist/index.js
- POSIX shells:
NODE_ENV=production PORT=5000 node dist/index.js
If you prefer, you can also run npm run start on POSIX shells; on Windows that may not correctly set NODE_ENV unless you add a cross-platform helper like cross-env to the project.
- PORT (optional) — port the Express server listens on. Default:
5000. - NODE_ENV — affects whether Vite runs in middleware mode (development) or the server serves static files from
dist/public(production).
Notes:
- No database / external services are required to run the project in its current state. The server uses an in-memory storage implementation (
server/storage.ts->MemStorage) by default so data will not persist between restarts. - The codebase contains dependencies and scripts (e.g.
drizzle-kit) that suggest a future or alternate database-backed storage, but that is not required for the app to run as-is.
If you later configure a database and Drizzle, the repository includes a script:
npm run db:push
This runs drizzle-kit push (see package.json). You will need to set the appropriate database env vars (e.g., DATABASE_URL) when using a real database.
- "Environment variable syntax": If a package script uses
NODE_ENV=...and it fails on Windows, use the Windows-specific examples above or run the project inside WSL/Git Bash. - "Port already in use": specify a different port by setting
PORTbefore starting the server (examples shown above). - "Build missing dist/public": run
npm run buildbefore running the server in production.
- Start the app in development following the instructions above.
- Visit http://localhost:5000/ (or your chosen port) to open the client.
- API endpoints are available under
/api(for exampleGET /api/internships).
If you'd like, I can also:
- Add a small convenience script to
package.jsonthat works cross-platform (usingcross-env), or - Add a
.env.examplelisting common environment variables.
Tell me which you'd prefer and I can add it next.