feat: add scripts/stop
This commit is contained in:
@@ -24,7 +24,8 @@ simple (one language, two packages) and is adequate for Spine's complexity level
|
||||
```
|
||||
spine/
|
||||
├── scripts/
|
||||
│ └── run # start the server as a daemon
|
||||
│ ├── run # start the server as a daemon
|
||||
│ └── stop # stop the daemon
|
||||
├── spine.el # entry point: bootstrap, server start, handlers
|
||||
├── templates/
|
||||
│ └── hello.mustache # smoke-test template
|
||||
@@ -141,12 +142,10 @@ scripts/run [HOST:]PORT
|
||||
```
|
||||
|
||||
- `scripts/run 9090` → `http://localhost:9090/hello`
|
||||
- `scripts/run 0.0.0.0:8080` → `http://0.0.0.0:8080/hello` (all interfaces)
|
||||
- `scripts/run` → `http://localhost:8080/hello`
|
||||
|
||||
Stop: `emacsclient --socket-name=spine --eval '(kill-emacs)'`
|
||||
Stop: `scripts/stop`
|
||||
|
||||
The socket name `spine` is separate from the default Emacs daemon socket,
|
||||
|
||||
so your personal daemon is unaffected.
|
||||
|
||||
Development use — interactive Emacs in the terminal:
|
||||
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
emacsclient --socket-name=spine --eval '(kill-emacs)' 2>/dev/null || {
|
||||
echo "Spine daemon is not running"
|
||||
exit 1
|
||||
}
|
||||
echo "Spine stopped"
|
||||
Reference in New Issue
Block a user