Hello all,
I am currently running a droplet with a Python Flask app, using Nginx. I am looking to add a NodeJS app to the droplet for a frontend. Is there any pitfalls to me doing this? I am relatively new to this side of computing, and am unsure of the best processes to follow.
I am also mostly unfamiliar with NodeJS, so I don’t know how the interactions work. Also is it possible to run two NodeJS apps together on one droplet? In the future I’d like to add another NodeJS app.
Thanks for any help and advice!
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hi @RizLord,
There won’t be any issues, I can confirm this as this is something I’ve tried many many times. You can have as many and different apps as you won’t as long as you use free ports on your server for them.
Additionally, if you are already using Nginx, you can configure it as a reverse proxy for your App to the NodeJS’s port.
All in all, you are 70% complete with Nginx, you just need to configure NodeJS and your Nginx configuration to be used as a reverse proxy. You can take pointers from this tutorial:
Regards, KFSys
Hey @RizLord,
Shouldn’t be a problem at all. Just make sure you run your node.js applications on different ports.
Use NGINX proxying functionality to point different routes to different ports.
Here’s an example:
Where
9999
is your node.js port.