Sunday, 16 December 2018

ReactJS: How to deploy on local server

I have a web app developed with a NodeJS + Express + GraphQL + MongoDB back-end and a ReactJS + Apollo front-end. I would like to deploy this application locally. Is that even possible?

I have come across dozens of "how to deploy to Heroku," "how to deploy to Digital Ocean", "how to deploy to Github", etc. But none that explains how to deploy locally.

Right now, I run: nodemon server for the back-end, and npm start for the front-end. I see the application running on http://localhost:3000/ (I use cors to connect the front end with the server running on port 3001).

I would like to just go to http://localhost:3000/ and see the app without having to execute the commands npm start and nodemon server. Is this possible? If so, how do I do that?

To my knowledge, our local server is not a WAMP server (our OS is Windows though). The IT department told me that it is a

[...] plain, regular old server. The address is localhost running on port 3000. You can open up another port on 3001 if you need it. Just drop your stuff on the C: drive and you should be good to go. I've never heard of Node or React so I can't help if you have questions.

Any ideas? Many thanks in advance for your help!



from ReactJS: How to deploy on local server

No comments:

Post a Comment