Skip to content

Commit

Permalink
Add pm2 api config
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliorizzo committed Jul 16, 2020
1 parent 7edbb40 commit db00cd0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pm2 start dist/services/blocks.config.js
### API

``` shell
node dist/api
pm2 start dist/api/api.config.js
```

## Commands
Expand Down
19 changes: 19 additions & 0 deletions src/api/api.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import config from '../lib/config'

const cwd = `${__dirname}`
const name = 'explorer-api'
const script = 'index.js'
const { log } = config

const conf = { script, name, cwd }

if (log && log.dir) {
let { dir } = log
conf.error_file = `${dir}/${name}-error.log`
conf.out_file = `${dir}/${name}-out.log`
}


export const apps = [conf]

console.log(apps)

0 comments on commit db00cd0

Please sign in to comment.