Closed faddat closed 3 years ago
Slack reference https://universelabs.slack.com/archives/CD22EAGUX/p1570018426019900
Guy Lepage Oct 2nd at 8:13 AM
good morning @faddat
so here’s how you use nginx to run multiple ports on one GCP Compute Engine or Digital Ocean Droplet.
"Let me explain to you very simple why we do use Nginx for this Nodejs Web application. Example: Our Chat app when we start it running on port 3000 that is default of Nodejs application running. we can change the port to 3001 or 3002, or 8080 … so if you pointed your domain tabvn.com to Degital Ocean cloud vps so this case we can visit the chat app in http://tabvn.com:3000 so we need just see nodejs web app in default port 80 such at http://tabvn.com , that is why we use Nginx."
So we do not need to remove the express server from universe.engineering
brb.. dog walk.. :)
This is an old tutorial. Just posting for reference. I'm not suggesting this is one for us to execute. See "Tutorial list" at top of issue for list to execute.
This tutorial was something @itamarreif posted in Slack in late September.
@faddat, let’s both, you and I, run through this video today as well.
This is an old tutorial. Just posting for reference. I'm not suggesting this is one for us to execute. See "Tutorial list" at top of issue for list to execute.
This is an old tutorial. Just posting for reference. I'm not suggesting this is one for us to execute. See "Tutorial list" at top of issue for list to execute.
@guylepage3 I do not think the one you mentioned as showing how to do multiple ports.... does multiple ports.
Shows how to forward a single port using NGINX
Can you provide context? I just numbered the items in the list. @faddat
Did you complete the tutorial 1 in it's entirety @faddat?
@faddat Once all items in #80 Digital Ocean migration – Critical Path are complete, write up findings and then close this issue. Thx.
Now that we're running micro-services this issue is moot. closing.
Output:
tutorial1@tutorial1:~$ curl localhost:3000
Hey, I'm a Node.js app!tutorial1@tutorial1:~$
Tutorial 1 result:
Serving insecurely on port 80
See it here: http://142.93.6.162/
Second time here
I changed this so that it uses the latest ubuntu. Nginx is up and secured.
root@tutorial2:~# curl localhost:3000
Hello World!
Here's a great visual for Web Server (NGINX) vs. App Server (Node.js/Express.js)
https://medium.com/dev-blogs/multiple-nodejs-apps-on-single-server-47b8bba3ec68
Article is dokku propaganda and details routing subdomains to containers automatically with dokku.
Was not referencing the article. Was just showing the "visual" so that you can understand how NGINX fits in with everything.
Description Need to understand how to run node.js (Node, Express, Create-React-App) apps on virtual machine servers using NGINX.
Tutorial list
Other for later
Old references (DO NOT WATCH OR READ!)