An open API service indexing awesome lists of open source software.

https://github.com/nashaddams/supervisor

A supervisor for managing executable services.
https://github.com/nashaddams/supervisor

deno

Last synced: 2 months ago
JSON representation

A supervisor for managing executable services.

Awesome Lists containing this project

README

          

# supervisor

[![JSR](https://jsr.io/badges/@nashaddams/supervisor)](https://jsr.io/@nashaddams/supervisor)
[![JSR score](https://jsr.io/badges/@nashaddams/supervisor/score)](https://jsr.io/@nashaddams/supervisor)

A supervisor for managing executable services.

## Usage

```sh
deno run -A jsr:@nashaddams/supervisor [--help]
```

### Starting services

Create a `supervisor.yml` and define the services, e.g.:

```yaml
services:
argon:
exec: argon/argon
cobalt:
exec: cobalt/cobalt.sh
neon:
exec: neon/neon
compile:
context: neon
module: mod.ts
```

```sh
deno run -A jsr:@nashaddams/supervisor start
```

### Stopping services

```sh
deno run -A jsr:@nashaddams/supervisor stop
```

### Printing the service status

```sh
deno run -A jsr:@nashaddams/supervisor status
┌─────────┬─────────────┐
│ Service │ Status │
├─────────┼─────────────┤
│ argon │ not running │
├─────────┼─────────────┤
│ cobalt │ not running │
├─────────┼─────────────┤
│ neon │ running │
└─────────┴─────────────┘
```

### Compiling Deno executables

By providing the `compile` properties to a service, `supervisor` will create
standalone Deno executables for later use:

```sh
deno run -A jsr:@nashaddams/supervisor compile
```

### Library usage

Alternatively, `supervisor` can also be imported and used as a library class:

```ts
import { Supervisor } from "@nashaddams/supervisor";

const supervisor = new Supervisor();
```

See [the docs](https://jsr.io/@nashaddams/supervisor/doc) for further details.