Development Server api issue #7

Closed
opened 2026-02-04 16:26:52 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @Unkn0wn-MDCLXIV on GitHub (May 4, 2020).

When I clone the repository on my server and try to access the client via the servers' ip from a different machine on the network, the api requests are sent to localhost:1337 instead of the servers' ip.
I cannot get past the login page. It says it cannot connect to the server, because localhost obviously is not running the server.

Originally created by @Unkn0wn-MDCLXIV on GitHub (May 4, 2020). When I clone the repository on my server and try to access the client via the servers' ip from a different machine on the network, the api requests are sent to localhost:1337 instead of the servers' ip. I cannot get past the login page. It says it cannot connect to the server, because localhost obviously is not running the server.
OVERLORD added the documentation label 2026-02-04 16:26:52 +03:00
Author
Owner

@meltyshev commented on GitHub (May 6, 2020):

To run the development server on different IP or port you need to specify two environment variables with the same value: BASE_URL and REACT_APP_SERVER_BASE_URL. You can change BASE_URL in the .env file inside server folder, then create .env file in the client folder and place REACT_APP_SERVER_BASE_URL there. Or just simply run it without any changes by: BASE_URL=http://<server’s IP> REACT_APP_SERVER_BASE_URL=http://<server’s IP> npm start. I should add this somewhere to the documentation.

@meltyshev commented on GitHub (May 6, 2020): To run the development server on different IP or port you need to specify two environment variables with the same value: `BASE_URL` and `REACT_APP_SERVER_BASE_URL`. You can change `BASE_URL` in the `.env` file inside server folder, then create `.env` file in the client folder and place `REACT_APP_SERVER_BASE_URL` there. Or just simply run it without any changes by: `BASE_URL=http://<server’s IP> REACT_APP_SERVER_BASE_URL=http://<server’s IP> npm start`. I should add this somewhere to the documentation.
Author
Owner

@wahshibinharb commented on GitHub (May 9, 2022):

To run the development server on different IP or port you need to specify two environment variables with the same value: BASE_URL and REACT_APP_SERVER_BASE_URL. You can change BASE_URL in the .env file inside server folder, then create .env file in the client folder and place REACT_APP_SERVER_BASE_URL there. Or just simply run it without any changes by: BASE_URL=http://<server’s IP> REACT_APP_SERVER_BASE_URL=http://<server’s IP> npm start. I should add this somewhere to the documentation.

I did it and i get this.. any idea ?

Screen Shot 2022-05-09 at 11 57 20

@wahshibinharb commented on GitHub (May 9, 2022): > To run the development server on different IP or port you need to specify two environment variables with the same value: `BASE_URL` and `REACT_APP_SERVER_BASE_URL`. You can change `BASE_URL` in the `.env` file inside server folder, then create `.env` file in the client folder and place `REACT_APP_SERVER_BASE_URL` there. Or just simply run it without any changes by: `BASE_URL=http://<server’s IP> REACT_APP_SERVER_BASE_URL=http://<server’s IP> npm start`. I should add this somewhere to the documentation. I did it and i get this.. any idea ? ![Screen Shot 2022-05-09 at 11 57 20](https://user-images.githubusercontent.com/49900792/167376094-8802def0-c6b6-49c4-9e95-4d396c26c08e.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#7