{"id":27376298,"url":"https://github.com/julesguesnon/ws-filewatcher","last_synced_at":"2026-02-09T14:30:51.630Z","repository":{"id":50764721,"uuid":"279880561","full_name":"JulesGuesnon/Ws-Filewatcher","owner":"JulesGuesnon","description":":watch: A filewatcher that will create a Websocket server to allow you to know when your file is updated","archived":false,"fork":false,"pushed_at":"2021-05-30T16:34:48.000Z","size":9309,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T05:06:05.633Z","etag":null,"topics":["buckelscript","filewatcher","reason","reasonml","websocket"],"latest_commit_sha":null,"homepage":"","language":"Reason","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JulesGuesnon.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-15T13:47:57.000Z","updated_at":"2020-07-15T17:35:09.000Z","dependencies_parsed_at":"2022-09-10T23:40:24.315Z","dependency_job_id":null,"html_url":"https://github.com/JulesGuesnon/Ws-Filewatcher","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulesGuesnon%2FWs-Filewatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulesGuesnon%2FWs-Filewatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulesGuesnon%2FWs-Filewatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulesGuesnon%2FWs-Filewatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JulesGuesnon","download_url":"https://codeload.github.com/JulesGuesnon/Ws-Filewatcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248715223,"owners_count":21150063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buckelscript","filewatcher","reason","reasonml","websocket"],"created_at":"2025-04-13T12:36:16.202Z","updated_at":"2026-02-09T14:30:51.572Z","avatar_url":"https://github.com/JulesGuesnon.png","language":"Reason","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ws-Filewatcher\n\nWs-Filewatcher is a cli that will watch for file change and open a websocket server where it will send a message everytime the file is updated\n\n## :zap: Requirements\n\n-   [Npm](https://www.npmjs.com/) or [Yarn](https://yarnpkg.com/), the package managers for NodeJs\n\n## :wrench: Installation\n\nHere are the instruction to install the cli globally, but you can do it locally on your projects.\n\n```bash\nnpm i -g ws-filewatcher\nOR\nyarn global add ws-filewatcher\n```\n\n## :fire: Usage\n\nHere is the minimum you need to write to launch the service:\n\n```bash\nws-filewatcher -f path/to/my/file\n```\n\n**:warning: 'path/to/my/file' isn't necessarily an existing file. You may want to listen for a file creation. So if you make a typo in the path, it won't be considered as an error**\n\n### Options\n\n|               | Verbose         |\n| ------------- | --------------- |\n| parameter     | `--verbose`     |\n| shortcut      | `-v`            |\n| default value | _(bool)_`false` |\n| description   | Allow loggings  |\n\n|               | Port                                 |\n| ------------- | ------------------------------------ |\n| parameter     | `--port`                             |\n| shortcut      | `-p`                                 |\n| default value | _(number)_`9999`                     |\n| description   | Set the port of the WebSocket server |\n\n|               | Command                                      |\n| ------------- | -------------------------------------------- |\n| parameter     | `--command`                                  |\n| shortcut      | `-c`                                         |\n| default value | _(string)_`\"\"`                               |\n| description   | The command will be run on every file update |\n\n### Full example\n\n```bash\nws-filewatcher -f path/to/my/file -p 8080 -v -c 'cp folder/file other/folder/file'\n```\n\n### Client example\n\n_The example assume you are running the code inside a browser_\n\n```javascript\nconst ws = new WebSocket('ws://localhost:9999')\n\nws.onmessage = () =\u003e {\n    console.log('My file was updated!')\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulesguesnon%2Fws-filewatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulesguesnon%2Fws-filewatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulesguesnon%2Fws-filewatcher/lists"}