New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nmon

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nmon

Monitor remote files ( http currently ) for file modifications

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-81.82%
Maintainers
1
Weekly downloads
 
Created
Source

Nmon

Fire events when the http 'last-modified' header is changed for a file.

Build Status

Currently only http is supported

Usage

Install

npm install nmon

Examples

Monitoring a single file


var nmon = require( 'nmon' );
var mon = new nmon();

mon.create( 'http', {
	interval: 1000,
	name: 'potato',
	url: 'http://localhost:3000/file'
});

mon.on( 'potato', function( obj ) {
	console.log( 'potato has been updated: %s', obj.date );
});

mon.monitor();

Monitoring multiple files


var nmon = require( 'nmon' );
var mon = new nmon();

var srs = [
	{ 
		interval: 1000,
		name: 'file1',
		url: 'http://localhost:3000/file1',
	},

	{ 
		interval: 1000,
		name: 'file2',
		url: 'http://localhost:3000/file2',
	},
];


var i = 0, l = srs.length;
for ( ; i < l; i++ ) {
	var a = srs[i]
	mon.create( 'http', a );
	mon.on( a.name, function( o ) {
		console.log( 'TEST', o.name, o.date );
	});
}

mon.monitor();

FAQs

Package last updated on 14 Jul 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc