Skip to content

Instantly share code, notes, and snippets.

@yano3nora
Last active May 17, 2023 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yano3nora/ddfb9d701b340ff547b393fd76a57985 to your computer and use it in GitHub Desktop.
Save yano3nora/ddfb9d701b340ff547b393fd76a57985 to your computer and use it in GitHub Desktop.
watchexec - File watcher for Hot Reload. #dev

Overview

watchexec.github.io
github.com/watchexec/watchexec

nodemon みたいなやつ、npm 使えない環境で ... と思ったけど、古い package manager が outdated で、rust の cargo ありきの install 手順しか充実してないので微妙 ... 。

Getting Started

https://github.com/watchexec/watchexec/releases
watchexec/watchexec#100

  • mac では brew から install 可能
  • linux では古い package manager (yum とか) 対応してない
  • ので rust を入れて cargo (rust package manager) で入れるのが一番よさそう
# for mac
$ brew install watchexec

# for linux
## centos
$ yum install rust-toolset
## ubuntu
$ apt install rustc

## install by cargo
$ cargo install --locked watchexec-cli

# example
$ watchexec -r -e py -- python server.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment