{"id":20534402,"url":"https://github.com/qbit/nmon","last_synced_at":"2025-10-30T03:22:35.964Z","repository":{"id":2824023,"uuid":"3826142","full_name":"qbit/nmon","owner":"qbit","description":"Monitor remote files for changes. (JavaScript,NodeJS)","archived":false,"fork":false,"pushed_at":"2012-12-18T14:36:26.000Z","size":136,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-19T03:18:07.221Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/qbit.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":"2012-03-25T18:08:43.000Z","updated_at":"2015-07-21T13:36:28.000Z","dependencies_parsed_at":"2022-08-26T06:53:37.376Z","dependency_job_id":null,"html_url":"https://github.com/qbit/nmon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fnmon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fnmon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fnmon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fnmon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qbit","download_url":"https://codeload.github.com/qbit/nmon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242138823,"owners_count":20078006,"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":[],"created_at":"2024-11-16T00:26:33.088Z","updated_at":"2025-10-30T03:22:35.870Z","avatar_url":"https://github.com/qbit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nmon\nFire events when the http 'last-modified' header is changed for a file.\n\n [![Build Status](https://secure.travis-ci.org/qbit/nmon.png)](http://travis-ci.org/qbit/nmon)\n\n Currently only http and ftp are supported.\n\n## Usage\n\n### Install\n\n\tnpm install nmon\n\n## Examples\n\n### Monitoring a single file\n\n```javascript\n\nvar nmon = require( 'nmon' );\nvar mon = new nmon();\n\nmon.create( 'http', {\n\tinterval: 1000,\n\tname: 'potato',\n  // server: 'localhost', \\_________ Ftp options\n  // path: '/awesome',    |\n  // port: 'ftpport',     |\n  // user: 'ftpuser',     |\n  // pass: 'ftppass',     /\n\turl: 'http://localhost:3000/file'\n});\n\nmon.on( 'potato', function( obj ) {\n\tconsole.log( 'potato has been updated: %s', obj.date );\n});\n\nmon.monitor();\n```\n\n## Monitoring multiple files \n\n```javascript\n\nvar nmon = require( 'nmon' );\nvar mon = new nmon();\n\nvar srs = [\n\t{ \n\t\tinterval: 1000,\n\t\tname: 'file1',\n\t\turl: 'http://localhost:3000/file1',\n\t},\n\n\t{ \n\t\tinterval: 1000,\n\t\tname: 'file2',\n\t\turl: 'http://localhost:3000/file2',\n\t},\n\n  /*\n  {\n    interval: 1000,\n    name: 'ftp1',\n    server: 'localhost',\n    path: '/awesome'\n    // path: '/awesome2/' if path ends with a slash, nmon will return the most recent file in that directory\n  }\n  */\n];\n\n\nvar i = 0, l = srs.length;\nfor ( ; i \u003c l; i++ ) {\n\tvar a = srs[i], type;\n\n  if ( a.server ) {\n    type = 'ftp';\n  } else {\n    type = 'http';\n  }\n\n\tmon.create( type, a );\n\tmon.on( a.name, function( o ) {\n\t\tconsole.log( 'TEST', o.name, o.date );\n\t});\n}\n\nmon.monitor();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbit%2Fnmon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqbit%2Fnmon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbit%2Fnmon/lists"}