https://github.com/smeijer/watch-port
run an arbitrary command when a server reboots
https://github.com/smeijer/watch-port
Last synced: 9 days ago
JSON representation
run an arbitrary command when a server reboots
- Host: GitHub
- URL: https://github.com/smeijer/watch-port
- Owner: smeijer
- License: mit
- Created: 2024-11-27T16:35:48.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-11-27T18:24:39.000Z (5 months ago)
- Last Synced: 2025-04-23T08:08:13.309Z (9 days ago)
- Language: TypeScript
- Size: 65.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license
Awesome Lists containing this project
README
# watch-port
Run an arbitrary command when a server reboots.
As most servers temporarily close their socket when rebooting, we can listen to the `connect` and `disconnect` events to decide when a given command needs to rerun.
## Usage
```shell
watch-port -p 3003 -c "node regen-types.js --spec https://example.com/openapi.json"
```