time-node
Simple wrapper around node-timeago
Last updated 14 years ago by dpweb .
Repository · Original npm · Tarball · package.json
$ npm install time-node 
SYNC missed versions from official npm registry.

###clients-node
Adds app.clients to Expressjs showing recently connected clients

###app.js

	var express = require('express'), app = express();
	var server = require('http').createServer(app)
 	server.listen(85);

 	require('./clients-node.js')(app, timeoutsec=5);
 	// app.clients is a list of recently connected clients

 	app.get('/', function(r,s){
 		// show clients list
 		s.send(app.clients)
 	})

 	// In 10 seconds, the clients should be gone from the list
 	setTimeout(function(){console.log(app.clients)}, 10000)

Current Tags

  • 0.0.1                                ...           latest (14 years ago)

1 Versions

  • 0.0.1                                ...           14 years ago
Maintainers (1)
Downloads
Total 4
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE