fastify / fastify/fastify-cli

Only watch specified directory (--watch CLI param)

Open
#787 5 comments 2 reactions 0 assignees View on GitHub
good first issue
Dominant language
JavaScript
Stars
733
Forks
177
Avg merge
1d 20h
Merged PRs (30d)
3

Description

### Prerequisites

- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the feature has not already been requested

### 🚀 Feature Proposal

Allow a directory (or list of directories) to be passed into the `--watch` param

### Motivation

In my project, I have a small API subfolder. When I turn on --watch, it is monitoring my entire project root for changes, which leads to resets constantly.

### Example

Right now the only solution is to do something like this:
```bash
fastify start --watch --ignore-watch '.git node_modules out .next content public scripts utils styles pages config compontents' --log-level info --pretty-logs --port ${API_PORT:-4321} api/server.js
```

I would rather do this:
```bash
fastify start --watch api --log-level info --pretty-logs --port ${API_PORT:-4321} api/server.js
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.