Skip to content

Commit 39e3a18

Browse files
authored
Update process-manager.md (#2205)
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.
1 parent be80082 commit 39e3a18

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

docusaurus/docs/dev-docs/deployment/process-manager.md

+29-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ app.start();
7777
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.
7878
:::
7979

80-
## Start PM2 with the `strapi` command
80+
## Start PM2 with the `strapi` command - Production
8181

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

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

8888
```bash
89-
pm2 start yarn --name app -- start
89+
pm2 start yarn --name your-app-name -- start
9090

9191
```
9292

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

9797
```bash
98-
pm2 start npm --name app -- run start
98+
pm2 start npm --name your-app-name -- run start
99+
100+
```
101+
102+
</TabItem>
103+
104+
</Tabs>
105+
106+
## Start PM2 with the `strapi` command - Development
107+
108+
To start PM2 and your development application from a terminal you should start PM2 and pass the application name and start command as arguments:
109+
110+
<Tabs groupId="yarn-npm">
111+
112+
<TabItem value="yarn" label="yarn">
113+
114+
```bash
115+
pm2 start yarn --name your-app-name -- develop
116+
117+
```
118+
119+
</TabItem>
120+
121+
<TabItem value="npm" label="npm">
122+
123+
```bash
124+
pm2 start npm --name your-app-name -- run develop
99125

100126
```
101127

0 commit comments

Comments
 (0)