这是indexloc提供的服务,不要输入任何密码
Skip to content
Discussion options

You must be logged in to vote

Generate the pm2 config file
(PM2 Ecosystem File)

pm2 ecosystem

Generate the ecosystem.config.js file in your turborepo root directory. and you will get this sample config file:

module.exports = {
  apps: [
    {
      script: "index.js",
      watch: ".",
    },
    {
      script: "./service-worker/",
      watch: ["./service-worker"],
    },
  ],

  deploy: {
    ...
  },
};

Configure your turborepo apps in the ecosystem.config.js file

module.exports = {
  apps: [
    {
      namespace: "my-turborepo-project",
      name: "web",
      script: "yarn start --port 3000",
      cwd: "./apps/web",
      watch: ".",
    },
    {
      namespace: "my-turborepo-project",
      name: "docs",

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@javad7z7
Comment options

@JefteCaro
Comment options

Answer selected by anthonyshew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants