Тёмный

How to Host Multiple Node Apps with nginx and pm2 

Code With Bubb
Подписаться 55 тыс.
Просмотров 11 тыс.
50% 1

In this tutorial i'll show you how to host multple Node apps on a single serverwith nginx and pm2.
Read the article here: codebubb.com/posts/how-to-hos...
Get $200 free Digital Ocean credit using this link! www.juniordevelopercentral.co...
00:00 Intro
00:30 What you’ll need
00:45 Setting up the 1st Node app
01:50 Using PM2
02:45 nginx reverse proxy
05:03 Adding a 2nd Node app
As mentioned at the start of the video, some extra help getting you set up if you don't have nginx, node and pm2 installed:
- Nginx installation • DevTips Daily: Rick an...
- Node.js installation • DevTips Daily: Rick an...
- PM2 installation • DevTips Daily - Rick a...
OK so this was actually a viewer's question from a previous video that dealt with how to add a new SSH key to an old server.
The question was asking how to host multiple Node apps on one server/IP so this video will show you how to use nginx, PM2 and of course Node.js to create multiple apps all running under the one domain.
#nodejs #nginx #digitalocean

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

 

9 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 29   
@jupo.
@jupo. Месяц назад
Quick, concise, and clear! Thank you heaps
@codewithbubb
@codewithbubb Месяц назад
Thanks very much. Hope it helped you out.
@RickMeijer
@RickMeijer 9 месяцев назад
Thank you. No fluff, clear instructions. Got it running on the first try.
@codewithbubb
@codewithbubb 9 месяцев назад
Cheers! Glad you got it working. I hate fluff 🤣
@krzemir1
@krzemir1 Год назад
Thanks, this is clean and simple
@zoki5388
@zoki5388 Год назад
Hey James, Thanks a lot for creating this video.
@codewithbubb
@codewithbubb Год назад
You’re welcome! Hope it answered your question (let me know if not!).
@zakyzamroni
@zakyzamroni 10 дней назад
THANKYOUU SO MUCHHH!!🤩🤩🤩🤩🤩🤩
@AlfredoCelso
@AlfredoCelso 5 месяцев назад
Very clear explanation, thanks a lot.
@codewithbubb
@codewithbubb 5 месяцев назад
You’re welcome. Hope it helps you out.
@davidemmanuel3001
@davidemmanuel3001 Год назад
This is a great topic. All apps seem to run on port 80
@codewithbubb
@codewithbubb Год назад
Yeah, if you wanted to make use of SSL if you have it setup you would want to move those ‘location’ blocks into the nginx conf section that manages that 👍
@janstergaard703
@janstergaard703 2 месяца назад
On the page with text descriptions.. Change to this: sudo systemctl reload nginx Since this sudo "sudo systemctl nginx reload" give an error.
@janstergaard703
@janstergaard703 2 месяца назад
Thank a lot for your video!
@codewithbubb
@codewithbubb 2 месяца назад
Thanks so much for this - i'll update it!
@netsaosa4973
@netsaosa4973 Год назад
wasn't working for me until I put the / at the end of my proxypass -_-
@blockchainandweb3120
@blockchainandweb3120 Год назад
Thanks bro. Do you know why is that ?
@netsaosa4973
@netsaosa4973 Год назад
@@blockchainandweb3120no idea
@marcuschong1660
@marcuschong1660 11 месяцев назад
Thank you. So glad to see this comment. I've been spending hours to figure out the issue only to come across your solution that works
@ljlinen
@ljlinen 2 месяца назад
thanks bro, this also worked for me, i wasted a lot of energy on just a slash '/' dang
@sriphagaaruchtsrinhichaarn5942
Have a problem how get another folder file😕 Please advise.
@wingmanup7368
@wingmanup7368 Год назад
use the touch command. For example touch
@hoatranquang8376
@hoatranquang8376 9 месяцев назад
Dear Codebubb, The first thank big for you. I had problems. - after install nodejs, npm, pm2 - when i action: pm2 list -->Spawning PM2 daemon with pm2_home=/home/vietk/.pm2 and pm2 start app.js -->Spawning PM2 daemon with pm2_home=/home/vietk/.pm2 --> it can not show table as you was worked. I had tried many method( install Os Ubuntu 22.04 , install nodejs..., but it still have problems as above Can you and everybody help me! Thnak you so much.
@codewithbubb
@codewithbubb 9 месяцев назад
Hi, how did you install pm2? It could be it was installed with elevated privileges (root?) and then you're running it as another user? Try sudo pm2 list and see if you still get the error.
@hoatranquang8376
@hoatranquang8376 9 месяцев назад
@@codewithbubb Dear you, it still error -->Spawning PM2 daemon with pm2_home=/home/vietk/.pm2 Thank you
@codewithbubb
@codewithbubb 9 месяцев назад
Did you try it as root? Are you able to run any other node stuff on your server? Try running with debug to see if there is any more info: DEBUG=* pm2 list Also, check your disk isn't full and also check the permissions/ownership of your pm2 module e.g. ls -alh /usr/local/lib/node_modules/pm2 (or wherever your global node_modules are).
@hoatranquang8376
@hoatranquang8376 9 месяцев назад
@@codewithbubb Thank you so much. I installed nodejs and pm2 by manual Result is ok
@codewithbubb
@codewithbubb 9 месяцев назад
@@hoatranquang8376 Ah great! Glad to hear you got it sorted.
Далее
Кто то встречал их на улице?
00:59
Zlatan embarrasses Speed 😂 #ishowspeed
00:32
Просмотров 4,6 млн
Full Node.js Deployment - NGINX, SSL With Lets Encrypt
23:48
Node.js is a serious thing now… (2023)
8:18
Просмотров 632 тыс.
How to host multiple websites on Nginx
4:39
Просмотров 3,9 тыс.
Storing Images in S3 from Node Server
39:59
Просмотров 83 тыс.
git rebase - Why, When & How to fix conflicts
9:45
Просмотров 31 тыс.
Кто то встречал их на улице?
00:59