Skip to content

Commit

Permalink
Update process-manager.md (#2205)
Browse files Browse the repository at this point in the history
Added section that gives explicit commands for how to start development server with pm2.

Change command example to give clearer indication of which text needs to be replaced in these commands.
  • Loading branch information
eskres authored Sep 10, 2024
1 parent be80082 commit 39e3a18
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions docusaurus/docs/dev-docs/deployment/process-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ app.start();
TypeScript projects require additional code in the `server.js` file to identify the correct directory. See the previous TypeScript code example or the [TypeScript documentation](/dev-docs/typescript#start-strapi-programmatically) for additional details.
:::

## Start PM2 with the `strapi` command
## Start PM2 with the `strapi` command - Production

To start PM2 and your application from a terminal you should start PM2 and pass the application name and start command as arguments:

Expand All @@ -86,7 +86,7 @@ To start PM2 and your application from a terminal you should start PM2 and pass
<TabItem value="yarn" label="yarn">

```bash
pm2 start yarn --name app -- start
pm2 start yarn --name your-app-name -- start

```

Expand All @@ -95,7 +95,33 @@ pm2 start yarn --name app -- start
<TabItem value="npm" label="npm">

```bash
pm2 start npm --name app -- run start
pm2 start npm --name your-app-name -- run start

```

</TabItem>

</Tabs>

## Start PM2 with the `strapi` command - Development

To start PM2 and your development application from a terminal you should start PM2 and pass the application name and start command as arguments:

<Tabs groupId="yarn-npm">

<TabItem value="yarn" label="yarn">

```bash
pm2 start yarn --name your-app-name -- develop

```

</TabItem>

<TabItem value="npm" label="npm">

```bash
pm2 start npm --name your-app-name -- run develop

```

Expand Down

0 comments on commit 39e3a18

Please sign in to comment.