cauefcr / gw

A Wrapper of a command to watch any changes in filesystem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GW (Go Watcher)

Stacks

  • Built in Go

Features

A Wrapper of a command to watch any changes in filesystem, then re-run the command again. Especially, when you are developing a backend API, you need to run again your API very often, every time you edit a code. GW will automatically run your API again for you.

Demo

demo

How to use

$ gw [COMMAND arg1, arg2, ...]

e.g.

$ gw go run server.go
** Ctrl-C to exit **
2019/05/12 00:01:00 Listening to the port 8080...

# any changes in filesystem
Tyring to run the command...
2019/05/12 00:01:10 Listening to the port 8080...
  • for Node.js

You can use gw instead of nodemon.

$ gw node server.js
** Ctrl-C to exit **
Listening to port 4000

# any changes in filesystem
Tyring to run the command...
Listening to port 4000

gw supports gitignore

How to install

Homebrew

$ brew install mattdamon108/tools/gw

Using go get

$ go get -u github.com/mattdamon108/gw

Build with the source code

  1. Git clone
$ git clone https://github.com/mattdamon108/gw.git
  1. Build & Install
$ go install

Next to do

  • error handling
  • reduce unnecessary re-runs

About

A Wrapper of a command to watch any changes in filesystem


Languages

Language:Go 100.0%