Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Node.js app working on my local machine but not others
I’m in the process of setting up a node.js app and just got it working on my local machine, but it’s not loading on friends or family’s laptops or my phone.
I followed the instructions in https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-18-04.
I have a few suspicions about what might be causing the problem, but I’m very new to this and wanted to see if you all had any suggestions. In descending order of suspiciousness:
- I set up LetsEncrypt. I noticed that when the app fails to load on another computer on Chrome, the URL bar is indicating that the URL isn’t secure, even though I have LetsEncrypt and the website shows up as secure on my machine. During setup, I also indicated option 2:
Redirect - Make all requests redirect to secure HTTPS access
- I’m not sure if I’m running Babel properly. I have presets set in my package.json, but not sure if I need to run it manually on the server (this feels wrong, but I don’t know of a better way)
- I’m running node with
node -r esm server.js(with ES6 code, arrow functions and the like). I’ve been testing with the newest versions of Chrome so this shouldn’t be a problem, but I’m not sure, esp. if I’m not using Babel properly
- Set up IPv6 on my droplet
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×