Question

How to access our node app from nginx website?

Posted February 17, 2020 206 views
Deployment

Hello! i am new to digitalocean here....i deployed my static website using nginx and when i try to access my droplet ip-address i access my static website. Now on the other hand i also deployed my MEAN app in a same droplet as well…when i run my MEAN application from console the my application is running on “<droplet-ip-address>:port”. Now my question is that i want to configure my MEAN application in a way that when i try to access “<droplet-ip-address>:port/meanapp” then i want to navigation from my static website to MEAN application.

How to configure this scenario…Thanks

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.

×
1 answer

Hello,

What you could do is set up Nginx as a reverse proxy for your Node.js application. You can follow the steps here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

Hope that this helps! Let me know if you have any questions.
Regards,
Bobby

by Brennen Bearnes
Node.js is an open source JavaScript runtime environment for easily building server-side and networking applications. Node.js applications can be run at the command line but this guide focuses on running them as a service using PM2, so that they will automatically restart on reboot or failure, and can safely be used in a production environment.
Submit an Answer