简体   繁体   中英

Deploy React website with node.js backend

I have developed website in react and node.js as intermediary to send and receive response. Now i want to put this on a machine in lab , so everyone can access it. Can i Install node on machine in lab and run same setup as on my dev machine and give ip of that server?

I tried searching deployment with node js an react, but everyone using AWS, or some external server after npm build. How do I deploy my react app on lab machine with out actually copying code?

如果您希望每个人都访问您的服务器,您可以与他们共享您的私人IP,以便其他人可以使用它来访问它

yourip:port

Two Things before you share your IP and PORT:

  1. Have a process monitor setup in your lab machine, Check out pm2 . This will help you run your application in the background, monitor your application and start your application after restart.

  2. Enable port in your firewall for everyone to use. if your lab system is Ubuntu then allow ufw for the port.

Now you can share your IP:PORT and everyone would be able to access it, provided they all are connected to the same network.

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