Watch for a folder changes and execute an action in Nest.js

445 views Asked by At

I'm developing a Nest.js app in which I want to set a watcher on a folder in the server. If a file is added to that folder an action is triggered.

How can I do that in Nest.js?

1

There are 1 answers

0
Dawid On

Node.js has built in module for that fs.watch but it has a couple of issues so i would suggest using https://www.npmjs.com/package/chokidar