Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vladimyr/pm2-conf
https://github.com/vladimyr/pm2-conf
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/vladimyr/pm2-conf
- Owner: vladimyr
- License: mit
- Created: 2019-05-07T20:46:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T22:15:13.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T05:56:44.024Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.82 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pm2-conf
[![build status](https://badgen.net/travis/vladimyr/pm2-conf/master)](https://travis-ci.com/vladimyr/pm2-conf) [![install size](https://badgen.net/packagephobia/install/{{name})](https://packagephobia.now.sh/result?p={{name}) [![npm package version](https://badgen.net/npm/v/pm2-conf)](https://npm.im/pm2-conf) [![github license](https://badgen.net/github/license/vladimyr/pm2-conf)](https://github.com/vladimyr/pm2-conf/blob/master/LICENSE) [![js semistandard style](https://badgen.net/badge/code%20style/semistandard/pink)](https://github.com/Flet/semistandard)
> Build [PM2](https://github.com/Unitech/pm2) ecosystem config
## Install
$ npm i vladimyr/pm2-conf
## Usage
Modify your `ecosystem.config.js`:
```js
module.exports = require('pm2-conf')({
// `name` is determined from `package.json`'s `name` property
script: require.resolve('./server')
});
```## API
#### Table of Contents
- [buildConfig](#buildconfig)
- [Parameters](#parameters)
- [Examples](#examples)
- [StartOptions](#startoptions)### buildConfig
Builds pm2 ecosystem configuration
#### Parameters
- `options` **[StartOptions](#startoptions)** app start options (optional, default `{}`)
#### Examples
```javascript
const buildConfig = require('pm2-conf');
buildConfig({ name: 'my-app', script: require.resolve('./server') });
//=> pm2 ecosystem configuration
```Returns **[array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[StartOptions](#startoptions)>** pm2 configuration
### StartOptions
- **See: **