{"id":15175694,"url":"https://github.com/riteek712/log-watcher-js","last_synced_at":"2026-02-28T07:01:38.192Z","repository":{"id":254951458,"uuid":"847550448","full_name":"Riteek712/log-watcher-js","owner":"Riteek712","description":"implementation of a log watcher file with help of WebSocket, it's a bare bone implementation of tail -f command from UNIX","archived":false,"fork":false,"pushed_at":"2024-08-27T04:20:49.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-02T22:46:03.312Z","etag":null,"topics":["expressjs","nodejs","websocket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Riteek712.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-26T04:47:20.000Z","updated_at":"2024-08-27T04:20:53.000Z","dependencies_parsed_at":"2024-08-27T05:31:47.774Z","dependency_job_id":"8c1027e9-eadf-4071-b681-e6059d312a98","html_url":"https://github.com/Riteek712/log-watcher-js","commit_stats":null,"previous_names":["riteek712/log-watcher-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Riteek712%2Flog-watcher-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Riteek712%2Flog-watcher-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Riteek712%2Flog-watcher-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Riteek712%2Flog-watcher-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Riteek712","download_url":"https://codeload.github.com/Riteek712/log-watcher-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232266854,"owners_count":18497140,"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":["expressjs","nodejs","websocket"],"created_at":"2024-09-27T12:40:18.822Z","updated_at":"2026-02-28T07:01:38.109Z","avatar_url":"https://github.com/Riteek712.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Log Watching Solution\n\nThis project implements a log-watching solution using Node.js. It consists of a WebSocket server that monitors a log file for updates and streams these updates to connected clients in real-time. The client-side is a simple web page that displays the log updates.\n\n## Features\n\n- **Server-Side:**\n  - Monitors a log file for changes.\n  - Streams new log entries to connected WebSocket clients.\n  - Sends the last 10 lines of the log file to new clients.\n\n- **Client-Side:**\n  - Connects to the WebSocket server.\n  - Displays real-time log updates without refreshing the page.\n\n## Usage\n\n- The server will start on `ws://localhost:8080`.\n- Open the `index.html` file in a web browser to view the log updates.\n\n## Notes\n\n- Make sure to adjust the `LOG_FILE_PATH` in `server.js` to point to the actual log file you want to monitor.\n- The server will watch for file changes and push updates to all connected clients.\n- The client-side JavaScript code handles WebSocket connections and updates the log display in real-time.\n\n## Setup\n\n1. **Clone the repository:**\n\n    ```bash\n    git clone \u003crepository-url\u003e\n    cd log-watcher\n    ```\n\n2. **Install dependencies:**\n\n    ```bash\n    npm install\n    ```\n\n3. **Create and populate the log file:**\n\n    ```bash\n    touch logfile.log\n    ```\n\n4. **Run the server:**\n\n    ```bash\n    node server.js\n    ```\n\n5. **Access the client:**\n\n    Open `index.html` in a web browser or serve it using a local HTTP server.\n\n\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friteek712%2Flog-watcher-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friteek712%2Flog-watcher-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friteek712%2Flog-watcher-js/lists"}