Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ### Biến môi trường | ||
| - `backend/.env`: `PORT`, `MONGO_URI`, `JWT_SECRET`, `CLIENT_URL`, `FRONTEND_URL`, `STRIPE_SECRET_KEY`, các khóa Cloudinary (nếu dùng). | ||
| - `frontend/.env`, `admin/.env`, `users-admin/.env`: `VITE_API_URL=http://localhost:4000`. | ||
| - `mobile/src/api/client.ts` & `mobile/src/until/image.ts`: cập nhật `API_URL` phù hợp (VD: `http://10.0.2.2:4000` trên Android emulator). | ||
| - Backend: `backend/.env`: `PORT`, `MONGO_URI`, `JWT_SECRET`, `CLIENT_URL`, `FRONTEND_URL`, `STRIPE_SECRET_KEY`, và `khóa Cloudinary/Uploads` (nếu dùng). | ||
| - Frontend: `frontend/.env`, `admin/.env`, `users-admin/.env`: `VITE_API_URL=http://localhost:5000)`. | ||
| - Mobile: cập nhật `mobile/src/api/client.ts` & `mobile/src/until/image.ts` với `API_URL` phù hợp (VD: `http://10.0.2.2:5000` trên Android emulator). |
There was a problem hiding this comment.
Env sample points clients to wrong/invalid API host
The updated env samples now instruct setting VITE_API_URL=http://localhost:5000) for all web apps (lines 48-51), but the backend still defaults to port 4000 (backend/server.js binds to 4000 unless PORT is set). Following the README as written (run npm run server with no env vars) makes every client call port 5000, which returns connection errors because nothing is listening there, and the trailing ) produces an invalid URL when copied verbatim. Please keep the sample host consistent with the backend default or document that PORT must be set to 5000.
Useful? React with 👍 / 👎.
No description provided.