How to deploy node api with ngnix on VPS

  Рет қаралды 7,568

Hitesh Choudhary

Hitesh Choudhary

Күн бұрын

Deploying a Node.js application on a VPS with Nginx is essential for making your app accessible via a domain name. Begin by installing Node.js on your server. Create a new directory for your Express app, set up your package.json, and install necessary dependencies like Express and NodeMon. Create an ‘index.js’ file to serve as the entry point for your application. Test your setup by running ‘npm run dev’ to ensure the server is operational. To keep your app running in the background, install and use PM2, a process manager that ensures your app stays live and auto-restarts if it crashes. Next, configure Nginx as a reverse proxy by editing the Nginx configuration file. Set up the proxy to forward traffic from port 443 to your Node.js application, ensuring secure and efficient traffic management. Finally, test your configuration to confirm everything is working smoothly. This comprehensive guide simplifies the deployment process, making it straightforward to get your Node.js app live on a VPS with Nginx.
Tools used in this course:
Terminal : www.warp.dev/
VPS used: Linode and Digital Ocean
Docs: docs.chaicode.com
Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year.
Get all source code for react application:
github.com/hit...
All source code is available at my Github account:
github.com/hit...
Our Open-Source Project is here: freeapi.app
Join me at whatsapp: hitesh.ai/what...
for community discord: hitesh.ai/discord
Instagram pe yaha paaye jaate h:
/ hiteshchoudharyofficial
Learn React with 10 projects: • Let's learn react from...
Learn Docker: • A practical guide on D...
Learn Kubernetes: • Complete Kubernetes Co...
How does a browser works: • How does a browser wor...
How nodejs works: • How node JS works | En...
Learn Redux-toolkit: • Learn Redux Toolkit in...
Learn NextJS: • Nextjs Full stack course
Learn Typescript: • Why to learn Typescript
Learn Javascript: • Welcome to new JavaScr...
Learn React Native: • React Native Mastery: ...
Learn Zustand: • React state management...
Learn Golang: • How to get started wit...

Пікірлер: 88
@pratiksrivastav2655
@pratiksrivastav2655 3 ай бұрын
Your efforts to provide the content for us student simple thanks won't be enough, but that's all i can do from comments.. no money currently for super thanks 👍
@harshitahuja6737
@harshitahuja6737 6 ай бұрын
Thanks for the re-recording
@imamansoni
@imamansoni 6 ай бұрын
+1 thanks for re recording
@dsah264
@dsah264 6 ай бұрын
thanks sir for re-recording enjoying the tutorial and also gain confidence in spinning vps
@thati64
@thati64 6 ай бұрын
Thank you for re-recording and your commitment to the community. Kudos to you...
@jashan8636
@jashan8636 5 ай бұрын
Thanks for doing this 2nd time. It really means a lot
@RobiulHossain-f2k
@RobiulHossain-f2k 5 ай бұрын
Your Simpler way to presenting is great!
@pushparajmehta
@pushparajmehta 6 ай бұрын
I really appreciate the effort you put into creating these videos, regardless of focusing on views. This type of content deserves to reach a larger audience so that more people can benefit from it. I love your dedication and am grateful for the re-recording. I'll make sure this video reaches a wider audience and will do my best to help by sharing it.
@anandshinde0358
@anandshinde0358 6 ай бұрын
Thank you so much sir ❤❤❤ for recording
@shwetanshu13
@shwetanshu13 6 ай бұрын
Very helpful series sir. Thank you so much for the re-recording also.
@karandalakoti1694
@karandalakoti1694 27 күн бұрын
Thanks a lot for re-recording the video
@vimdesarrollo896
@vimdesarrollo896 6 ай бұрын
GREAT VIDEO! Great series! Hello world from Mexico!
@kd-u1o
@kd-u1o 6 ай бұрын
I am waiting for this amazing videos playlist ❤❤
@HiteshCodeLab
@HiteshCodeLab 6 ай бұрын
Very soon!
@IAmPurnimaSrivastava
@IAmPurnimaSrivastava 6 ай бұрын
Thankyou so much for this amazing video, and thanks for the second effect :)
@AbhishekRai-qp7ww
@AbhishekRai-qp7ww 6 ай бұрын
Thanks Sir for your hardwork, we are blessed.❤
@ridamsinghal1073
@ridamsinghal1073 5 ай бұрын
Thank you sir for re-recording this video
@Aasim
@Aasim 6 ай бұрын
Thank you sir, for recording this 2nd time
@SyedYaseen-q6k
@SyedYaseen-q6k 6 ай бұрын
Thanks for doing it. Really appreciate it
@lakshaymahajan8457
@lakshaymahajan8457 2 ай бұрын
Thanks for re-recording the video.
@anandjaiswal3621
@anandjaiswal3621 6 ай бұрын
Thanks for re recording sir ❤
@devve7
@devve7 4 ай бұрын
Great video !! Thank you! 😁👍👍
@AbhimanPratap-gm5cr
@AbhimanPratap-gm5cr 6 ай бұрын
Hey Thanks For Doing One More Time Sir😄
@MittuRohith
@MittuRohith 5 ай бұрын
love this series.
@azeesabdul2674
@azeesabdul2674 6 ай бұрын
Great teacher ❤
@BharatBhandari-s5i
@BharatBhandari-s5i 3 ай бұрын
Amazing series amazing content
@infinitetsukuyomi1038
@infinitetsukuyomi1038 6 ай бұрын
Thank you sir ❤
@nsantanu
@nsantanu Ай бұрын
Excellent video 👍
@Mansoorahmedofficial_777
@Mansoorahmedofficial_777 6 ай бұрын
thank bhaiiya for recording,
@sravanakirtana2787
@sravanakirtana2787 6 ай бұрын
Thanks for re recording it
@niranjantechintelugu
@niranjantechintelugu 5 ай бұрын
Thanks for sharing good stuff ❤
@awesome-kartikey
@awesome-kartikey 5 ай бұрын
Thanks for re-recording.
@ayushnegi5119
@ayushnegi5119 Ай бұрын
Thanks for the video and efforts
@pavankalyanbattu6946
@pavankalyanbattu6946 6 ай бұрын
Thank you for re-recording
@Amin-uo5un
@Amin-uo5un 6 ай бұрын
Hi thanks for recording such contents
@ayyappanadapana316
@ayyappanadapana316 6 ай бұрын
Thanks for doing one more time...
@starboyles
@starboyles 9 күн бұрын
thanks for this video!
@SubhamSaurabh-jz4wd
@SubhamSaurabh-jz4wd 6 ай бұрын
thanks sir for re-recording
@zainulabideen_1
@zainulabideen_1 6 ай бұрын
Thanks for re recoding
@khushaljogi1146
@khushaljogi1146 6 ай бұрын
Thanks for re recording
@HasanKhan-x1p
@HasanKhan-x1p 5 ай бұрын
Thank you for the video
@sanchitwadehra
@sanchitwadehra 3 ай бұрын
Dhanayavad
@abhishekkushwaha3029
@abhishekkushwaha3029 6 ай бұрын
Thank you sir
@pikundas9639
@pikundas9639 6 ай бұрын
Thank you
@TheSydney1292
@TheSydney1292 5 ай бұрын
Thank you sir
@Buddhirchok
@Buddhirchok 6 ай бұрын
great!
@ravisaini9312
@ravisaini9312 6 ай бұрын
Appreciate it
@thegamesopener8114
@thegamesopener8114 6 ай бұрын
Thanks for the video. But do we really need nodemon as a dependency, it should be a devDependency right ?
@ankurkumar5323
@ankurkumar5323 6 ай бұрын
🔥🔥
@sagaryenkure5112
@sagaryenkure5112 6 ай бұрын
Thanks
@anil-kumar75
@anil-kumar75 6 ай бұрын
Thanks for re-recording
@Superuser-r1y
@Superuser-r1y 6 ай бұрын
Ci Cd bhe integrate krna bhaiya 👍
@npnkdknpn
@npnkdknpn 6 ай бұрын
Sir how did you do in this video how to keep two windows together in please tell me this shortcut key...?? How you can easily split tab...??
@jerrybritto1813
@jerrybritto1813 Ай бұрын
Thank you
@devpiush
@devpiush 6 ай бұрын
we can do the same thing without the pm2 and the default nodejs api right. Instead in the real world scenario we can pull a docker image and run thaa container and reverse proxy into that. Am i right sir???
@amitsangwan446
@amitsangwan446 6 ай бұрын
fun tutorial
@gopinathk1485
@gopinathk1485 6 ай бұрын
Hi ji, what happened for backend series continuation?
@awaizdottech
@awaizdottech 6 ай бұрын
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
@sam_sharma24
@sam_sharma24 6 ай бұрын
living legends
@ishwarmaske9626
@ishwarmaske9626 6 ай бұрын
nice video and waiting for on hindi channel
@jenilmangukiya525
@jenilmangukiya525 2 ай бұрын
😍♥
@Code_with_Reza
@Code_with_Reza 6 ай бұрын
hay thanks for donig this
@skphotographyediting8983
@skphotographyediting8983 2 ай бұрын
Sir if possible can you make another video on handling CORS with nginx with multiple origins? Thanks in advance ❤❤
@chillpill610
@chillpill610 2 ай бұрын
love
@pratyushgaming9522
@pratyushgaming9522 6 ай бұрын
sir deployed successfully yesterday my threads backend on AWS...by reading your docs....they are very beginner friendly...some problems occurred on nginx setup in ec2...with missing of sites_enabled etc files....but after some research solved the problem and wrote a blog on node API hosting on vps...my difficulties..and how I solved them......thanx for your amazing resource and videos
@Superuser-r1y
@Superuser-r1y 6 ай бұрын
How can I find your blog?
@alexdin1565
@alexdin1565 6 ай бұрын
please can you make a video about django docker deployment ?
@Shubham-rf2bs
@Shubham-rf2bs 5 ай бұрын
@armaan4770
@armaan4770 5 ай бұрын
@damn-yg1gm
@damn-yg1gm 2 ай бұрын
tq
@thirumalaraojuvvisetti
@thirumalaraojuvvisetti 3 ай бұрын
Could you please make an video CI/CD pipeline way of deployment
@JeevanTV-do2hc
@JeevanTV-do2hc 6 ай бұрын
Thank you sir I have some doubts I'll ask here take your time to reply For example I have 2 application One runs on port 8000 and 8080. How can we set up reverse proxy? For both the application. Traffic only comes in port 80 https request that has to forward to 8000 and 8080? Thank you If anyone knows will be helpful
@John-s9u5g
@John-s9u5g 4 ай бұрын
Sir please change documentation and remove VIM>>>>> lazy people like me copy paste the code not able get out of the vim.
@TechReviewPro024
@TechReviewPro024 5 ай бұрын
Bro, make a video on how to install n8n in a server and use the community version for unlimited automation
@shwetanshu13
@shwetanshu13 6 ай бұрын
Sir, please use vim instead of nano in the next video please.
@ayushporwal5950
@ayushporwal5950 5 ай бұрын
Less number of comments show alot how many people are actually doing the steps up to here. Seems like not many :( or everyone just too smart?
@Mohittyagi2025
@Mohittyagi2025 13 күн бұрын
some problem occured during this process
@Biisal-ai
@Biisal-ai 6 ай бұрын
Please deploy django too
@saurabh75prakash
@saurabh75prakash 4 ай бұрын
Thanks for rerecording
@vaibhavchoursiya-y1f
@vaibhavchoursiya-y1f 3 ай бұрын
Thapa technical vps tutorial is better. I think.
@ShaheerAhmed-ff9wg
@ShaheerAhmed-ff9wg 6 ай бұрын
1
@singhanuj620
@singhanuj620 5 ай бұрын
@PrajjwalVerma-q3i
@PrajjwalVerma-q3i 6 ай бұрын
Thank you for re-recording and your commitment to the community. Kudos to you...
@varunraj1823
@varunraj1823 6 ай бұрын
Thank you sir ❤
@p369m
@p369m 6 ай бұрын
thanks sir for re-recording
@hariomjha01
@hariomjha01 6 ай бұрын
Thank you sir
@azizurrehman8910
@azizurrehman8910 20 күн бұрын
@robinsonnadar6764
@robinsonnadar6764 6 ай бұрын
Thank you so much for everything
Your own Vercel on VPS - Coolify
14:07
Hitesh Choudhary
Рет қаралды 15 М.
How to configure Ngnix on VPS for the 1st time
17:02
Hitesh Choudhary
Рет қаралды 4,5 М.
Cape Coral, Florida Fire Department rescues alligator stuck in storm drain
00:30
Кого Первым ИСКЛЮЧАТ из ШКОЛЫ !
25:03
How Strong is Glass? 💪
00:25
Brianna
Рет қаралды 29 МЛН
How to Deploy a Node.js App to Digital Ocean (Nginx, Ubuntu)
20:03
docker stack is my new favorite way to deploy to a VPS
27:47
Dreams of Code
Рет қаралды 167 М.
Serverless might bankrupt you (and how to deploy to a VPS instead)
14:26
What if all the world's biggest problems have the same solution?
24:52
Dockerize Next.js & Deploy to VPS (EASY!)
19:43
ByteGrad
Рет қаралды 78 М.
Here's why you need Nginx as a Reverse Proxy for your Node.js app
10:17
Software Developer Diaries
Рет қаралды 35 М.
How To Deploy NodeJS API (Linode)
55:56
The Full Stack Junkie
Рет қаралды 20 М.
Node.js: The Documentary | An origin story
1:02:49
Honeypot
Рет қаралды 698 М.
Why I'd never host my apps on a VPS
13:43
Web Dev Cody
Рет қаралды 74 М.
Cape Coral, Florida Fire Department rescues alligator stuck in storm drain
00:30