go-serviceman/README.md

35 lines
626 B
Markdown
Raw Normal View History

2019-07-01 04:31:31 +00:00
# go-serviceman
2019-07-01 08:44:48 +00:00
A cross-platform service manager.
Goal:
```bash
serviceman install [options] [interpreter] <service> [-- [options]]
```
```bash
serviceman install --user ./foo-app -- -c ./
```
```bash
serviceman install --user /usr/local/bin/node ./whatever.js -- -c ./
```
2019-07-03 08:11:50 +00:00
```bash
serviceman run --config conf.json
```
```json
{
"interpreter": "/Program Files (x86)/node/node.exe",
"exec": "/Users/aj/demo/demo.js",
"argv": ["--foo", "bar", "--baz", "qux"]
}
```
```bash
go generate -mod=vendor ./...
go build -mod=vendor -ldflags "-H=windowsgui"
.\\go-serviceman node ./demo.js -- --foo bar --baz qux
```