By RizLord
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!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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:
location /route {
proxy_pass http://127.0.0.1:9999/;
}
Where 9999 is your node.js port.
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.