# @infect/rda-service-manager

> RDA Service Manager - starting and stopping RDA services

Latest version **2.1.2** (published 2022-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @infect/rda-service-manager
pnpm add @infect/rda-service-manager
yarn add @infect/rda-service-manager
bun add @infect/rda-service-manager
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2022-04-19 |
| First published | 2018-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lina van der Weg |
| Maintainers | ee, fxstr, tobiaskneubuehler |
| Keywords | rda |

## Links

- npm: https://www.npmjs.com/package/@infect/rda-service-manager
- Repository: https://github.com/infect-org/rda-service-manager
- Homepage: https://github.com/infect-org/rda-service-manager#readme
- Issues: https://github.com/infect-org/rda-service-manager/issues
- npm.io page: https://npm.io/package/@infect/rda-service-manager

## Dependencies (1)

- [colors](https://npm.io/package/colors.md) ^1.4.0

## Recent versions

- 2.1.2 (latest) — 2022-04-19
- 2.1.1 — 2022-03-30
- 2.1.0 — 2020-04-08
- 2.0.4 — 2019-10-06
- 2.0.3 — 2019-10-04
- 2.0.2 — 2019-08-23
- 2.0.1 — 2019-08-23
- 1.0.3 — 2019-06-28
- 1.0.2 — 2018-09-09
- 1.0.1 — 2018-09-09
- 1.0.0 — 2018-09-09

## README

# RDA Service Manager

starting and stopping RDA services


## API


```javascript
import ServiceManager from '@infect/rda-service-manager';

// pass the args that need to be passed to the processes
// running the service to the service manager
const manager = new ServiceManager({
    args: '--dev --log-level=error+ --log-module=*'.split(' ')
});


// start services by their name. the service manager is looking for 
// them in the node_modules and in the local file system on the same
// level as the project the service manager is executed in
await sm.startServices('rda-service-registry');

// stop a specific service, if no parameters are passed all services
// are stopped
await sm.stopServices('rda-service-registry');
```

### Constructor

The constructor accepts an array with command line paramters that 
are then passed to the child processes starting services.

```javascript
const manager = new ServiceManager({
    args: '--dev --log-level=error+ --log-module=*'.split(' ')
});
```


#### manager.startServices()

Starts services in the order passed to this function. the service 
manager is looking for the services in the node_modules and in the 
local file system on the same level as the project the service manager 
is executed in

```javascript
await sm.startServices(serviceName[, serviceName, [...]]);
```


#### manager.stopServices()

Stops the services that have one of the names passed to the method. 
If no name is passed all services are stopped. Services are stopped
in the reverse order they were started. 

```javascript
await sm.stopServices(serviceName[, serviceName, [...]]);
```

---
_Source: https://npm.io/package/@infect/rda-service-manager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
