Skip to content

Last Update README.md - #25

Closed
TNTDanh wants to merge 1 commit into
mainfrom
TNTDanh-patch-1
Closed

TNTDanh wants to merge 1 commit into
mainfrom
TNTDanh-patch-1

Conversation

@TNTDanh

@TNTDanh TNTDanh commented Nov 25, 2025

Copy link
Copy Markdown
Owner

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread README.md
Comment on lines 48 to +51
### 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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@TNTDanh TNTDanh closed this Nov 25, 2025
@TNTDanh
TNTDanh deleted the TNTDanh-patch-1 branch November 25, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants