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/
|
spine/
|
||||||
├── scripts/
|
├── 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
|
├── spine.el # entry point: bootstrap, server start, handlers
|
||||||
├── templates/
|
├── templates/
|
||||||
│ └── hello.mustache # smoke-test template
|
│ └── hello.mustache # smoke-test template
|
||||||
@@ -141,12 +142,10 @@ scripts/run [HOST:]PORT
|
|||||||
```
|
```
|
||||||
|
|
||||||
- `scripts/run 9090` → `http://localhost:9090/hello`
|
- `scripts/run 9090` → `http://localhost:9090/hello`
|
||||||
- `scripts/run 0.0.0.0:8080` → `http://0.0.0.0:8080/hello` (all interfaces)
|
Stop: `scripts/stop`
|
||||||
- `scripts/run` → `http://localhost:8080/hello`
|
|
||||||
|
|
||||||
Stop: `emacsclient --socket-name=spine --eval '(kill-emacs)'`
|
|
||||||
|
|
||||||
The socket name `spine` is separate from the default Emacs daemon socket,
|
The socket name `spine` is separate from the default Emacs daemon socket,
|
||||||
|
|
||||||
so your personal daemon is unaffected.
|
so your personal daemon is unaffected.
|
||||||
|
|
||||||
Development use — interactive Emacs in the terminal:
|
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