Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/teamwork/watcher

Watcher for restarting your project when any changes are made.
https://github.com/teamwork/watcher

go golang tooling watcher

Last synced: about 1 month ago
JSON representation

Watcher for restarting your project when any changes are made.

Awesome Lists containing this project

README

        

# watcher

A watcher that doesn't care about GOPATH, or anything really, just watches
some paths and run

## Installation

```
go get github.com/teamwork/watcher/cmd/watcher
```

## Usage

```bash
watcher go run ./cmd/someservice
```

The example above will watch any file changes with the default matcher on
current working dir

## Defaults

**Match**: `(?:go\.mod|\.(?:go|tmpl))$`
**Exclude**: `^vendor/`
**Paths**: _current working dir_

## New

Support for setting ENV vars from .env files

```
$ echo "HELLO=world" > .env
$ watcher sh -c 'echo $HELLO'

(watcher) run triggered...
world
(watcher) process interrupted:
```