-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
Here is the usage of PM2 with bun: https://bun.com/docs/guides/ecosystem/pm2#with-a-configuration-file.
This is the example it shows above:
module.exports = {
title: "app", // Name of your application
script: "index.ts", // Entry point of your application
interpreter: "bun", // Bun interpreter
env: {
PATH:${process.env.HOME}/.bun/bin:${process.env.PATH}, // Add "~/.bun/bin/bun" to PATH
},
};
But we are using next.js. There is no specific startup file such as "index.ts" above. So we have to run "bun run start" from PM2.
This is the available solution:
pm2 start bun --name my_proj_name -- start
But how to translate the command to a config file? I try to fill bun run start in the script field, but PM2 does not accept it.
Metadata
Metadata
Assignees
Labels
No labels