You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is recommended to use [pm2](https://github.com/Unitech/pm2) to run a pdf-bot process.
6
+
7
+
First install `pm2`
8
+
9
+
```
10
+
npm install -g pm2
11
+
```
12
+
13
+
[Create a configuration file using the one in this repo as an example](https://github.com/esbenp/pdf-bot/blob/master/production/pm2.config.js)
14
+
15
+
`pdf-bot-process.config.js`
16
+
```javascript
17
+
module.exports= {
18
+
apps : [{
19
+
name :"pdf-bot",
20
+
script :"pdf-bot",
21
+
args :"api -c ./pdf-bot.config.js",
22
+
// Should be from whatever folder your pdf-bot.config.js is in
23
+
// cwd : "/home/[user]/",
24
+
env: {
25
+
"DEBUG":"pdf:*",
26
+
"NODE_ENV":"production",
27
+
},
28
+
}]
29
+
}
30
+
```
31
+
32
+
Run in using `pm2 start pdf-bot-process.config.js`
33
+
34
+
[Read more about starting the app on server restarts](http://pm2.keymetrics.io/docs/usage/startup/)
35
+
36
+
## Use nginx to proxy requests
37
+
38
+
If you run `pdf-bot` on port 3000 or similar it is recommended to run it behind an nginx proxy.
39
+
40
+
Create a site that listens to port 80 and uses the [config from the `production/` folder](https://github.com/esbenp/pdf-bot/blob/master/production/nginx.conf)
0 commit comments