简体   繁体   中英

Accessing client and server app on diff machine on local network

I want to route client app requests coming from a different machine on my local network, to the server on my dev machine.

I have a client side app running on port 8080, and a server app running on port 3000.

I am accessing the client app from another machine on the local network using:

machineName:8080

However, the requests from the client app are obviously all being sent to localhost:3000 rather than machineName:3000 .

How do I fix this issue?

我必须按照以下步骤在客户端应用程序上转发API请求:

'http://' + window.location.hostname + ':3000'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM