Demo for SeaweedFS Filer-Change-Data-Capture on Node.JS
References: SeaweedFS
The default port for Filer gRPC will be 18888
Tips: if the SeaweedFS server takes time to start on single-node setup, add the following options to startup command line
<Your startup command>
...
-master.electionTimeout 1s \
-master.heartbeatInterval 100ms \
-master.raftHashicorp
Copy .env.example
to .env
then modify the environment variables in there.
The latest filer.proto
can be downloaded from here
npm start
The below steps is demo for watching file event at S3 buckets directories.
Make a new bucket
aws --endpoint-url http://localhost:8333 s3 mb s3://newbucket3
References: AWS-CLI-with-SeaweedFS
Example:
FILER_GRPC_ADDRESS=localhost:18888
FILER_WATCHER_CLIENT_NAME=seaweedfs-filer-watcher
FILER_WATCHER_PATH_PREFIX=/buckets
npm start
Open http://localhost::8888 at any browser.
Then, navigate to /buckets/newbucket3
folder.
Click button [Upload] on the right side to upload any file.