8 lines
190 B
Bash
Executable File
8 lines
190 B
Bash
Executable File
#!/bin/zsh
|
|
cd -- "${0:A:h}"
|
|
python3 -m http.server 8018 --bind 127.0.0.1 &
|
|
server_pid=$!
|
|
trap 'kill "$server_pid" 2>/dev/null' EXIT INT TERM
|
|
open 'http://127.0.0.1:8018/'
|
|
wait "$server_pid"
|