[英]Accessing React App externally, when running 'npm start'
I'm using create-react app
. 我正在使用
create-react app
。 In order to view the project in the browser locally: 为了在浏览器中本地查看项目:
npm start
npm start
http://localhost:3000/
for the URL on the same computer (Or other port I specify). http://localhost:3000/
作为同一台计算机上的URL(或我指定的其他端口)。 I'd like to be able to access the project from browsers on other computers as well. 我也希望能够从其他计算机上的浏览器访问该项目。 This is for the purpose of QA.
这是为了进行质量检查。 How can I set it?
我该如何设置? Is there a way to set it in the
package.json
file, and without npm eject
? 有没有一种方法可以在
package.json
文件中进行设置,而无需使用npm eject
?
You can establish Public Connection using ngrok
. 您可以使用
ngrok
建立公共连接。 When you run ngrok you instantly get a public address to your local development machine. 运行ngrok时,您会立即获得本地开发计算机的公共地址。 You share generated public Ngrok link (viz. http://92832de0.ngrok.io ) with other users.
您与其他用户共享生成的公共Ngrok链接(即http://92832de0.ngrok.io )。 They connect to Ngrok and this connection between their pc and Ngrok is referred to as Public Connection
他们连接到Ngrok,并且他们的PC和Ngrok之间的这种连接称为“公共连接”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.