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

Поділитися
Вставка
  • Опубліковано 11 гру 2024

КОМЕНТАРІ • 72

  • @Codebrah
    @Codebrah  Рік тому +4

    Having a hard time deploying your app?
    I'll do it for you, pain free: codingwithcodebrah.com/deploy-4-me

  • @ibrahimmaroof7099
    @ibrahimmaroof7099 8 місяців тому +2

    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

  • @bilalchami1
    @bilalchami1 Рік тому +6

    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 🙏🏼

  • @vvan22
    @vvan22 Рік тому +2

    It's amazing that you can remember all of those commands and parameters 🙌

  • @zlackbiro
    @zlackbiro Рік тому +9

    This tutorial is amazing. I done everything on my VPS for the first time so smooth without any problems.

  • @MiSt3300
    @MiSt3300 11 місяців тому

    Holy crap that actually worked! Thanks bro, you're the best!
    I need to finish watching this, I stopped at 12:49

  • @natsudragneel7884
    @natsudragneel7884 9 місяців тому

    Awesome video bro, I was struggling to get my backend up and running but your video saves my day.
    Thanks a lot.

  • @MystikMasi
    @MystikMasi 6 місяців тому

    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 Рік тому +1

    One of the best tutorials I've watched on this or any topic. Thank you!

  • @shivanshyadav1041
    @shivanshyadav1041 Рік тому +1

    Awesome video, this is my first time using DigitalOcean this video is to the point. Great Work 👍👍

  • @Chilenaz0o
    @Chilenaz0o Рік тому

    The best video i've seen explaining things like that .. straightforward Thanks!

  • @WorldNewsThisWeek
    @WorldNewsThisWeek 11 місяців тому

    Fantastic explanation, a literal lifesaver, incredibly useful, thanks so much bro / brah!

  • @pyfinx
    @pyfinx 6 місяців тому

    really useful step by step guide to deploy on linux. thanks!

  • @ganielledotexe8938
    @ganielledotexe8938 Рік тому

    you got yourself a new subscriber and a fan. Thanks @CodeBrah ! You're a f*cking legend !

  • @giansingh4710
    @giansingh4710 7 місяців тому

    I LOVE YOUUUU. This was great. Thanks a lot. Saved me a bunch of time. lol

  • @abduladilsunnat2489
    @abduladilsunnat2489 Рік тому

    Thank you so much ive been struggling for a very long time with this

  • @101sokratis
    @101sokratis Рік тому

    Was really helpful never used nginx but was able to do what I needed. thanks

  • @dezzymei
    @dezzymei 3 місяці тому

    You want to keep package-lock in your codebase though right?

  • @jonice4229
    @jonice4229 5 місяців тому

    will be the same steps for deploying a remix.js app?

  • @petradjokoo2150
    @petradjokoo2150 7 місяців тому

    You gotta do the same for all nodes to be run on VPS ? Even the cryoto

  • @iliassglitch
    @iliassglitch Рік тому

    This video is just perfect! Thank you so much

  • @sharan.r
    @sharan.r 5 місяців тому

    The server works on desktops/laptops but not on mobile phones, any idea why?

  • @WeTouchGrassTV
    @WeTouchGrassTV 10 місяців тому

    how would you go about automatically pushing github repo updates to the server?

  • @TechGenieNP
    @TechGenieNP Рік тому

    Hey I am having problem. I got stuck on welcome to Nginx server.

  • @shubhamarutwar9396
    @shubhamarutwar9396 Рік тому +1

    Thanks mate, video is detailed af

  • @chibuzoraustine
    @chibuzoraustine Рік тому

    Totally awesome bro … 🎉💜

  • @mavbcn1790
    @mavbcn1790 9 місяців тому

    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

  • @MonaCodeLisa
    @MonaCodeLisa 10 місяців тому

    Thank you so much for this great video :)

  • @nicholassmith6412
    @nicholassmith6412 10 місяців тому

    very helpful, thanks!

  • @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?

  • @luolijuan8564
    @luolijuan8564 10 місяців тому

    Hi thanks for the vedio. Can you teach me in zoom to deploy a plotly dash app using nginx and uWSGI in digital ocean?

  • @amiwrong3085
    @amiwrong3085 Рік тому

    man you are the best

  • @calinciobanu259
    @calinciobanu259 2 роки тому +1

    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  2 роки тому

      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?

  • @donichrisdianto7017
    @donichrisdianto7017 Рік тому

    when using scp files.zip:~/ what password we input here ? I input my root password and it says permission denied

  • @xkatooo
    @xkatooo 10 місяців тому

    How do I tattoo a video?

  • @welldiscerned7540
    @welldiscerned7540 Рік тому

    Dude , Thanks so much !!!!!

  •  3 місяці тому

    appriciated man

  • @kingsmanSmBanglaGaming
    @kingsmanSmBanglaGaming Рік тому

    yey worked, thanks mate

  • @GreatBigMouth77
    @GreatBigMouth77 9 місяців тому

    Great tutorial!
    PS: Jesus Christ your keyboard is LOUD

  • @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

  • @xiube1953
    @xiube1953 6 місяців тому

    thank you so much.

  • @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.

  • @createdbydenning8682
    @createdbydenning8682 Рік тому

    Is nginx necessary

  • @bakaleisanich
    @bakaleisanich Рік тому

    Thank you!

  • @aleksanderribeiro8272
    @aleksanderribeiro8272 Рік тому

    very very good!!!

  • @__Time__clock
    @__Time__clock Рік тому

    8:25 you put an s at http😅

  • @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.

  • @lidroxd6869
    @lidroxd6869 Рік тому

    I love you so much

  • @manarali4094
    @manarali4094 2 роки тому

    Nice video

  • @muhammad_abir
    @muhammad_abir Рік тому

    thanks a lot

  • @Oops-404
    @Oops-404 Рік тому

    i am getting 504 timeout

  • @kos.produtora
    @kos.produtora Рік тому

    you are a fucking legend. Thank you so much! Helps a lot. Thanks!

  • @JunaidRajput-d9h
    @JunaidRajput-d9h Рік тому

    perfect

  • @vernevens1598
    @vernevens1598 8 місяців тому +1

    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 8 місяців тому

    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 Рік тому +1

      @@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 11 місяців тому

      ​@@Codebrahthe process itself is a bit frustrating but the video is great and helps make it less frustrating.