Closed jasonchitla closed 1 year ago
You have to run npm build
to generate the static html page for the game client. You have to deploy those to your server and setup Nginx to read those static files. This should not be too much of a problem.
If I have some time this week I'll try deploying it too. I haven't tried it before.
Thanks, I got it to work. I have nginx and passenger working together to serve the index.html file in the root of the project. My problem was that in index.html, I had to change "bundle.js" to "./dist/bundle.js" and before that I had to call "npm build" like you said. The only problem right now is that I still have to separately call "npm start" in terminal of my ubuntu server to get the server running. I thought passenger would handle this after I am setting "passenger_startup_file" to "./server/index.js" but its not right now. I'll let you know if I fix it.
Hi, I'm trying to set up this node app on Digital Ocean and feel really close to get it working. I have a Ubuntu NodeJS 6.9.5 on 14.04 instance from Digital Ocean running, and I'm trying to run the node app with nginx and Passenger with resources such as the following: https://www.phusionpassenger.com/library/walkthroughs/deploy/nodejs/ownserver/nginx/oss/trusty/deploy_app.html
I think I'm not setting up the correct ports/paths to things and editing firewall correctly. I'm also confused in general how the setup in the aforementioned article would work because when running this node app locally I have to call both "npm start" and "npm run client."
Any clarity would help :)