- Serves static content.
- Reloads and reservers content automatically when file content changes.
Works only on Linux and Unix systems.
watchman server
Starts a web server at port 8000 to serve static html content.
watchman watch
Starts a web server at port 8000 to serve static html content and reloads when changes happen to the file content.
Helps in auto reloading of changes. Changes can be previewed without restarting the server. Make changes to the html files and hit browser refresh to see the changes. Save time while development html based apps.
-d
for target Directory (by default current directory is considered for serving or watching)
-p
for port on which the sever has to be run
[watchman] watchman -d ~/ -p 2000 server master ✭
Serving from directory "/Users/foobar/"
Listening on http://127.0.0.1:2000
curl -sSL https://get.haskellstack.org/ | sh
or
wget -qO- https://get.haskellstack.org/ | sh
git clone https://github.com/pamu/watchman.git
or
git clone git@github.com:pamu/watchman.git
cd watchman
stack build
in the same project root folder (inside watchman directory)
stack install
The above command will create a executable called watchman
and put the executable in
.local/bin
folder in your home directory.
export PATH="~/.local/bin/:$PATH"
Now you can access watchman
from you command line.