Bunjs with PM2

Motivation

I am using Bunjs for the backend for my Multiplayer naval game, Sunbaked.

Now, I wanted to have my server auto-restart when a server breaking error is thrown. I read through the official guide on how to use PM2 with Bunjs but fou…


This content originally appeared on DEV Community and was authored by Kitanga Nday

Motivation

I am using Bunjs for the backend for my Multiplayer naval game, Sunbaked.

Now, I wanted to have my server auto-restart when a server breaking error is thrown. I read through the official guide on how to use PM2 with Bunjs but found that it missed one small piece of info...

$ bun install -g pm2

Article done

That's it, don't install pm2 using npm, you'll end up with way more problems than you need.

You then run $ pm2 start --interpreter ~/.bun/bin/bun index.ts and you are good to go.


This content originally appeared on DEV Community and was authored by Kitanga Nday


Print Share Comment Cite Upload Translate Updates
APA

Kitanga Nday | Sciencx (2024-09-15T17:21:27+00:00) Bunjs with PM2. Retrieved from https://www.scien.cx/2024/09/15/bunjs-with-pm2/

MLA
" » Bunjs with PM2." Kitanga Nday | Sciencx - Sunday September 15, 2024, https://www.scien.cx/2024/09/15/bunjs-with-pm2/
HARVARD
Kitanga Nday | Sciencx Sunday September 15, 2024 » Bunjs with PM2., viewed ,<https://www.scien.cx/2024/09/15/bunjs-with-pm2/>
VANCOUVER
Kitanga Nday | Sciencx - » Bunjs with PM2. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/09/15/bunjs-with-pm2/
CHICAGO
" » Bunjs with PM2." Kitanga Nday | Sciencx - Accessed . https://www.scien.cx/2024/09/15/bunjs-with-pm2/
IEEE
" » Bunjs with PM2." Kitanga Nday | Sciencx [Online]. Available: https://www.scien.cx/2024/09/15/bunjs-with-pm2/. [Accessed: ]
rf:citation
» Bunjs with PM2 | Kitanga Nday | Sciencx | https://www.scien.cx/2024/09/15/bunjs-with-pm2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.