Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Mar 17, 2024
1 parent ee03d81 commit 8da2811
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ Service is a JavaScript/TypeScript module for managing system services. It offer
To use Service as a CLI program, you can install or upgrade it using Deno:

```sh
deno install -frA --name service jsr:@cross/service/install@1.0.0-rc.1
deno install -frA --name cross-service jsr:@cross/[email protected]/install
```

For library usage, install according to the instructions at [jsr.io/@cross/service](https://jsr.io/@cross/service) and simply import the `installService()` function from the `mod.ts` file:
For library usage in Node, Deno or Bun - install according to the instructions at [jsr.io/@cross/service](https://jsr.io/@cross/service) and simply import the `installService()` function from the
`mod.ts` file:

```ts
import { installService } from "@cross/service";
Expand All @@ -33,23 +34,23 @@ Install a command as a service:
```sh
# Using deno

service install --name my-service --cmd "deno run --allow-net /full/path/to/server.ts"
cross-service install --name my-service --cmd "deno run --allow-net /full/path/to/server.ts"

# ... or a generic executable (with arguments and extra paths)

service install --name my-service --cmd "/full/path/to/executable --optional-arg /full/path/to/config.ext" --path "/add/this/to/path:/and/this"
cross-service install --name my-service --cmd "/full/path/to/executable --optional-arg /full/path/to/config.ext" --path "/add/this/to/path:/and/this"
```

Uninstall a service:

```sh
service uninstall --name my-service
cross-service uninstall --name my-service
```

Generate a service configuration file without installing it:

```sh
service generate --name my-service --cmd "deno run --allow-net /full/path/to/server.ts --arg /full/path/to/config.ext"
cross-service generate --name my-service --cmd "deno run --allow-net /full/path/to/server.ts --arg /full/path/to/config.ext"
```

Note:
Expand Down

0 comments on commit 8da2811

Please sign in to comment.