"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Bunjs with PM2

Bunjs with PM2

Published on 2024-11-08
Browse:803

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

Release Statement This article is reproduced at: https://dev.to/kitanga_nday/bunjs-with-pm2-53ei?1 If there is any infringement, please contact [email protected] to delete it
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3