Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Understand how to run node.js apps on VM's #56

Closed
faddat opened this issue Oct 14, 2019 · 18 comments
Closed

Understand how to run node.js apps on VM's #56

faddat opened this issue Oct 14, 2019 · 18 comments
Assignees
Labels
enhancement Product and project enhancement item(s)
Projects

Comments

@guylepage3
Copy link
Contributor

guylepage3 commented Oct 14, 2019

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.

https://hackernoon.com/deploy-react-js-create-react-app-node-js-to-digitalocean-cloud-hosting-72206310017b

"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

@guylepage3
Copy link
Contributor

brb.. dog walk.. :)

@guylepage3 guylepage3 changed the title Get our web apps running on VMs Understand how to run node.js apps on VM's Oct 14, 2019
@guylepage3 guylepage3 added the enhancement Product and project enhancement item(s) label Oct 14, 2019
@guylepage3 guylepage3 added this to To do in Universe 11 via automation Oct 14, 2019
@guylepage3 guylepage3 moved this from To do to In progress in Universe 11 Oct 14, 2019
@guylepage3
Copy link
Contributor

@guylepage3
Copy link
Contributor

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
Copy link
Contributor

guylepage3 commented Oct 14, 2019

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.

@guylepage3
Copy link
Contributor

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
Copy link
Contributor

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.

@faddat
Copy link
Contributor Author

faddat commented Oct 14, 2019

@guylepage3 I do not think the one you mentioned as showing how to do multiple ports.... does multiple ports.

https://hackernoon.com/deploy-react-js-create-react-app-node-js-to-digitalocean-cloud-hosting-72206310017b

Shows how to forward a single port using NGINX

@guylepage3
Copy link
Contributor

guylepage3 commented Oct 14, 2019

Can you provide context? I just numbered the items in the list. @faddat

@guylepage3
Copy link
Contributor

Did you complete the tutorial 1 in it's entirety @faddat?

@guylepage3
Copy link
Contributor

@guylepage3
Copy link
Contributor

@faddat Once all items in #80 Digital Ocean migration – Critical Path are complete, write up findings and then close this issue. Thx.

@guylepage3 guylepage3 moved this from Up next... to To do in Universe 11 Oct 15, 2019
@guylepage3
Copy link
Contributor

Now that we're running micro-services this issue is moot. closing.

Universe 11 automation moved this from To do to Done Oct 20, 2019
@faddat faddat reopened this Oct 25, 2019
Universe 11 automation moved this from Done to In progress Oct 25, 2019
@faddat
Copy link
Contributor Author

faddat commented Oct 25, 2019

Tutorial 1 - scotch.io

  • Very basic app with no routes. If we changed our app to work like this one, our app would work.
  • Includes a bug, does not instruct user to install npm / node

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

@faddat
Copy link
Contributor Author

faddat commented Oct 25, 2019

Tutorial 2 - DIgital Ocean

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

I changed this so that it uses the latest ubuntu. Nginx is up and secured.

  • Does not use express
root@tutorial2:~# curl localhost:3000
Hello World!

https://tutorial2.universe.engineering

@faddat faddat removed this from In progress in Universe 11 Oct 25, 2019
@faddat faddat added this to To do in Universe 12 via automation Oct 25, 2019
@faddat faddat moved this from To do to In progress in Universe 12 Oct 25, 2019
@guylepage3
Copy link
Contributor

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

image

@faddat
Copy link
Contributor Author

faddat commented Oct 28, 2019

Article is dokku propaganda and details routing subdomains to containers automatically with dokku.

@guylepage3
Copy link
Contributor

Was not referencing the article. Was just showing the "visual" so that you can understand how NGINX fits in with everything.

@faddat faddat moved this from In progress to To do in Universe 12 Oct 29, 2019
@guylepage3 guylepage3 removed this from To do in Universe 12 Nov 12, 2019
@guylepage3 guylepage3 added this to To do in Universe 13 via automation Nov 12, 2019
@guylepage3 guylepage3 removed this from To do in Universe 13 Jan 7, 2020
@guylepage3 guylepage3 added this to To do in Universe 14 via automation Jan 7, 2020
@guylepage3 guylepage3 removed this from To do in Universe 14 Nov 2, 2020
@guylepage3 guylepage3 added this to To do in Universe 15 (On Hold) – Current via automation Nov 2, 2020
@guylepage3 guylepage3 added this to To do in Universe 14 via automation Nov 2, 2020
Universe 14 automation moved this from To do to Done Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Product and project enhancement item(s)
Projects
Universe 14
  
Done
Development

No branches or pull requests

2 participants