[GH-ISSUE #740] How can I see the affect with hot-reload after modified frontend code #3485

Closed
opened 2026-02-28 11:56:19 +03:00 by kerem · 3 comments
Owner

Originally created by @jxs1211 on GitHub (Nov 18, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/740

Describe the bug
I changed the frontend code, and need to re-build the code and reboot with go run main.go to see the affect on web, how can I see the affect with hot-reload?

Originally created by @jxs1211 on GitHub (Nov 18, 2024). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/740 **Describe the bug** I changed the frontend code, and need to re-build the code and reboot with `go run main.go` to see the affect on web, how can I see the affect with hot-reload?
kerem 2026-02-28 11:56:19 +03:00
Author
Owner

@0xJacky commented on GitHub (Nov 18, 2024):

In the project root, execute the following commands:

cd app
pnpm install
pnpm dev

Then you can start the dev server of the frontend.

<!-- gh-comment-id:2482455675 --> @0xJacky commented on GitHub (Nov 18, 2024): In the project root, execute the following commands: ``` cd app pnpm install pnpm dev ``` Then you can start the dev server of the frontend.
Author
Owner

@jxs1211 commented on GitHub (Nov 18, 2024):

In the project root, execute the following commands:

cd app
pnpm install
pnpm dev

Then you can start the dev server of the frontend.

I can't login in through the dev server listening on 3002:

Error: connect ECONNREFUSED 127.0.0.1:9001
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16)
7:42:16 PM [vite] http proxy error: /api/login
Error: connect ECONNREFUSED 127.0.0.1:9001
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16)
7:42:31 PM [vite] http proxy error: /api/login
Error: connect ECONNREFUSED 127.0.0.1:9001
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) (x2)

but I can access server listening on 9000.

<!-- gh-comment-id:2482817069 --> @jxs1211 commented on GitHub (Nov 18, 2024): > In the project root, execute the following commands: > > ``` > cd app > pnpm install > pnpm dev > ``` > > Then you can start the dev server of the frontend. I can't login in through the dev server listening on 3002: ```sh Error: connect ECONNREFUSED 127.0.0.1:9001 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) 7:42:16 PM [vite] http proxy error: /api/login Error: connect ECONNREFUSED 127.0.0.1:9001 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) 7:42:31 PM [vite] http proxy error: /api/login Error: connect ECONNREFUSED 127.0.0.1:9001 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) (x2) ``` but I can access server listening on 9000.
Author
Owner

@0xJacky commented on GitHub (Nov 18, 2024):

Create a .env file in the app folder, with the following content:

VITE_PROXY_TARGET=http://127.0.0.1:9001

Then re-run pnpm dev

<!-- gh-comment-id:2482832219 --> @0xJacky commented on GitHub (Nov 18, 2024): Create a `.env` file in the `app` folder, with the following content: ``` VITE_PROXY_TARGET=http://127.0.0.1:9001 ``` Then re-run `pnpm dev`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#3485
No description provided.