Тёмный

How to Deploy a Node.js App to Digital Ocean (Nginx, Ubuntu) 

CodeBrah
Подписаться 2,8 тыс.
Просмотров 52 тыс.
50% 1

In this video I show you how to upload and deploy a node.js node app to digitalocean or any other VPS. We use Ubuntu Linux, Nginx, NodeJS and pm2 to deploy our application.
Having a hard time deploying your app? I'll do it for you, pain free:
codingwithcode...
If you liked this video please consider liking, commenting and subscribing to the channel!
CODE:
server {
server_name example.com www.example.com;
location / {
proxy_pass localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Other Linux & Server Tutorials:
• Linux & Server Tutorials
Hire Me:
www.fiverr.com...

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 72   
@Codebrah
@Codebrah Год назад
Having a hard time deploying your app? I'll do it for you, pain free: codingwithcodebrah.com/deploy-4-me
@bilalchami1
@bilalchami1 Год назад
Amazing tutorial. I spent the whole afternoon jumping between articles and documentations. Usually I prefer blogs and documentation over videos but none were complete as yours. Thanks 🙏🏼
@ibrahimmaroof7099
@ibrahimmaroof7099 6 месяцев назад
omg i watched a lot of tutorials none of them worked until i found this guy the best video ever im going to download it and watch it every fucking day thanks man i love u so much you have no idea how much you have helped me
@zlackbiro
@zlackbiro Год назад
This tutorial is amazing. I done everything on my VPS for the first time so smooth without any problems.
@vvan22
@vvan22 11 месяцев назад
It's amazing that you can remember all of those commands and parameters 🙌
@MystikMasi
@MystikMasi 4 месяца назад
Wow thank you so much! This tutorial saved me a lot of time and helped me to understand what I have to to to run my Server! The first time I got it runnngin my websockets didn't work because it uses ws instead of wss. Now everything is running perfect :) Thanks a lot!
@gercoyne
@gercoyne Год назад
One of the best tutorials I've watched on this or any topic. Thank you!
@shivanshyadav1041
@shivanshyadav1041 Год назад
Awesome video, this is my first time using DigitalOcean this video is to the point. Great Work 👍👍
@natsudragneel7884
@natsudragneel7884 7 месяцев назад
Awesome video bro, I was struggling to get my backend up and running but your video saves my day. Thanks a lot.
@Chilenaz0o
@Chilenaz0o 10 месяцев назад
The best video i've seen explaining things like that .. straightforward Thanks!
@MiSt3300
@MiSt3300 9 месяцев назад
Holy crap that actually worked! Thanks bro, you're the best! I need to finish watching this, I stopped at 12:49
@pyfinx
@pyfinx 4 месяца назад
really useful step by step guide to deploy on linux. thanks!
@WorldNewsThisWeek
@WorldNewsThisWeek 9 месяцев назад
Fantastic explanation, a literal lifesaver, incredibly useful, thanks so much bro / brah!
@101sokratis
@101sokratis Год назад
Was really helpful never used nginx but was able to do what I needed. thanks
@abduladilsunnat2489
@abduladilsunnat2489 Год назад
Thank you so much ive been struggling for a very long time with this
@Codebrah
@Codebrah Год назад
Glad I could help
@ganielledotexe8938
@ganielledotexe8938 Год назад
you got yourself a new subscriber and a fan. Thanks @CodeBrah ! You're a f*cking legend !
@giansingh4710
@giansingh4710 5 месяцев назад
I LOVE YOUUUU. This was great. Thanks a lot. Saved me a bunch of time. lol
@iliassglitch
@iliassglitch Год назад
This video is just perfect! Thank you so much
@shubhamarutwar9396
@shubhamarutwar9396 Год назад
Thanks mate, video is detailed af
@MonaCodeLisa
@MonaCodeLisa 7 месяцев назад
Thank you so much for this great video :)
@GreatBigMouth77
@GreatBigMouth77 7 месяцев назад
Great tutorial! PS: Jesus Christ your keyboard is LOUD
@nicholassmith6412
@nicholassmith6412 8 месяцев назад
very helpful, thanks!
@chibuzoraustine
@chibuzoraustine Год назад
Totally awesome bro … 🎉💜
Месяц назад
appriciated man
@stefanotagliaferri7362
@stefanotagliaferri7362 Год назад
this is amazing man, thank you very much, I wanted to ask, whats that about the 3 months, do we need to reconfigure something after that time or the software is gonna keep running on the domain endlessly?
@xiube1953
@xiube1953 4 месяца назад
thank you so much.
@petradjokoo2150
@petradjokoo2150 5 месяцев назад
You gotta do the same for all nodes to be run on VPS ? Even the cryoto
@dezzymei
@dezzymei 23 дня назад
You want to keep package-lock in your codebase though right?
@sharan.r
@sharan.r 3 месяца назад
The server works on desktops/laptops but not on mobile phones, any idea why?
@amiwrong3085
@amiwrong3085 Год назад
man you are the best
@kingsmanSmBanglaGaming
@kingsmanSmBanglaGaming Год назад
yey worked, thanks mate
@welldiscerned7540
@welldiscerned7540 Год назад
Dude , Thanks so much !!!!!
@TechGenieNP
@TechGenieNP Год назад
Hey I am having problem. I got stuck on welcome to Nginx server.
@luolijuan8564
@luolijuan8564 8 месяцев назад
Hi thanks for the vedio. Can you teach me in zoom to deploy a plotly dash app using nginx and uWSGI in digital ocean?
@jonice4229
@jonice4229 3 месяца назад
will be the same steps for deploying a remix.js app?
@bakaleisanich
@bakaleisanich Год назад
Thank you!
@mavbcn1790
@mavbcn1790 7 месяцев назад
If I have apache as a main webserver, nginx and hestia cp, how should I do it? do you have any tutorial for this? thanks so much
@WeTouchGrassTV
@WeTouchGrassTV 8 месяцев назад
how would you go about automatically pushing github repo updates to the server?
@aleksanderribeiro8272
@aleksanderribeiro8272 10 месяцев назад
very very good!!!
@kos.produtora
@kos.produtora Год назад
you are a fucking legend. Thank you so much! Helps a lot. Thanks!
@lidroxd6869
@lidroxd6869 Год назад
I love you so much
@muhammad_abir
@muhammad_abir Год назад
thanks a lot
@calinciobanu259
@calinciobanu259 Год назад
Hey man! Can you plz give me a hand? if I have a website what do I put here? (at proxy_pass at 10.44). And the website url has to be some other than the url where the frontend is showing?
@Codebrah
@Codebrah Год назад
Howdy! Try something like this and let me know if it works server { root /var/www/example-domain.com; index index.html index.htm index.nginx-debian.html; server_name example-domain.com www.example-domain.com; location / { try_files $uri /index.html; } }
@lidroxd6869
@lidroxd6869 Год назад
It is work with mysql local host?
@Prince-qe1do
@Prince-qe1do Год назад
Always upload your app to your home directory otherwise your app wont work or you need to edit the config file.
@manarali4094
@manarali4094 Год назад
Nice video
@JunaidRajput-d9h
@JunaidRajput-d9h Год назад
perfect
@createdbydenning8682
@createdbydenning8682 Год назад
Is nginx necessary
@xkatooo
@xkatooo 8 месяцев назад
How do I tattoo a video?
@abbosbekraxmonov9718
@abbosbekraxmonov9718 Год назад
Hello is it working on http1 or http2? How to configure it
@Codebrah
@Codebrah Год назад
I'm not super sure, but I think if you use letsencrpt certbot, it will be http2. If you DO NOT setup HTTPS, I think its http1. If that doesnt work I think you set it like this in the code certbot generates: `listen 443 ssl http2;` And if all else fails, cloudflare CDN has http2 by default. You can check with this command in ur terminal tho: curl -I -v yourwebsite.com
@donichrisdianto7017
@donichrisdianto7017 10 месяцев назад
when using scp files.zip:~/ what password we input here ? I input my root password and it says permission denied
@emirhanpakyardm9142
@emirhanpakyardm9142 5 месяцев назад
same here, did you find the solution?
@emirhanpakyardm9142
@emirhanpakyardm9142 5 месяцев назад
oh nvm i got it
@__Time__clock
@__Time__clock Год назад
8:25 you put an s at http😅
@Oops-404
@Oops-404 Год назад
i am getting 504 timeout
@awesomecuber1222
@awesomecuber1222 Год назад
hey does this also work for deploying ios apps too?
@Codebrah
@Codebrah Год назад
Not 100% sure what you mean. You would deploy an iOS app with Apple on the app store, then deploy the NodeJS to a VPS (or something similar) and using API calls, they would talk to eachother. But yeah, this would work for the NodeJS portion.
@awesomecuber1222
@awesomecuber1222 Год назад
@@Codebrah So when I was originally making my app, I followed your tutorial on the NodeJS for making the authentication system. That was a couple months ago so I am not more versed in NodeJS and I created the entire app using the same structure, and having all of my data on the MySQL server that you originally set up. If I were to follow this tutorial except use a domain of mine instead of the localhost but leave the port for the mySQL server the same in the code, would it still work. I am confused on whether I need to deploy the NodeJS and MySql portions separately or what. Thank You so much in advance.
@Codebrah
@Codebrah Год назад
​@@awesomecuber1222 So generally, I would setup MySQL on the VPS. Then use the VPS's localhost to connect to MySQL. This tutorial doesnt use MySql I think, but the setup process would be pretty easy. You would use the command "apt install mysql-server" to install MySQL on the server. After that run "sudo mysql_secure_installation" for security. Then use the command line to make your DB and tables (which you would want the same as the ones on your mac). Once you have all that setup, I think from there, all you would need to change is the socket path in your .env file: "SQL_SOCKET_PATH=/Applications"/MAMP/tmp/mysql/mysql.sock ... if that doesnt work you can find the socket path in "/etc/mysql/mysql.conf.d/mysqld.cnf". You would also need to change the SQL_USER and SQL_PASSWORD (in .env) if those are different. Maybe I'll try to make a video on how to actually deploy your app in that series. I'll see if I have an extra domain name to make it.
@vernevens1598
@vernevens1598 6 месяцев назад
Why does everyone call these things VPS? The p stands for private. How is putting your stuff on the internet even remotely private?
@nested9301
@nested9301 Год назад
Render does not require all of this 🤦🏻‍♂️
@Codebrah
@Codebrah Год назад
True but render can't really handle as complex apps. Not for as cheap atleast.
@nested9301
@nested9301 Год назад
@@Codebrah oh thanks for clarfiying , can u please tell why u didn't use docker here
@vernevens1598
@vernevens1598 6 месяцев назад
another 20 minutes of my life wasted and still have no idea how to put a next.js app on a server. You should have called this video how to bend over for digital ocean. All you did was set up a server. I did all this six months ago.
@binarymatrix616
@binarymatrix616 Год назад
totally frustrating video
@Codebrah
@Codebrah Год назад
Why do you think so? So I can improve
@zlackbiro
@zlackbiro Год назад
@@Codebrah No, it looks like that because you need to enter so many commands. Someone need to have full focus and pause the video, rewind and continue to be good. Do not change anything. Anybody can config vps by looking this video. Looks like we hacking around but isnt that awesome to feel the power of linux. 😀
@chetan9533
@chetan9533 9 месяцев назад
​@@Codebrahthe process itself is a bit frustrating but the video is great and helps make it less frustrating.
Далее
How To Deploy NodeJS API (Linode)
55:56
Просмотров 19 тыс.
ЛЮБИТЕ ШКОЛУ?😁​⁠​⁠@osssadchiy
00:20
КОГДА НАКРОШИЛ НА ПОЛ #shorts
00:19
Full Node.js Deployment - NGINX, SSL With Lets Encrypt
23:48
Deploy React and NodeJS on Linux
29:59
Просмотров 16 тыс.
How to deploy node api with ngnix on VPS
16:33
Просмотров 3,7 тыс.
ЛЮБИТЕ ШКОЛУ?😁​⁠​⁠@osssadchiy
00:20