flail
v0.0.12
Published
If U R looking for a http proxy lib, [look here](http://npmjs.org/doji)
Downloads
22
Readme
Flail is a hosts manager
If U R looking for a http proxy lib, look here
Flail is a hosts manager build for nodejs server or worker
Also can be used like a util for look up is IP setted local.
What changed
remove the safeuse
. Don't watch the system file.
rename the use => load
##How to get this?
If U R using Mac
sudo npm install -g flail
If U R Windows_NT user
npm install -g flail
If U get some error like "Cannot find module 'flail'"
, see how to resolve the windows path;
How to check is IP setted?
If only check is IP setted at localhost, just
var flail = require('flail');
var hosts = flail.load();
var list = flail.get('10.21.225.13');
if (list['flail.com']) {
// YES flail.com has added
}
or
var flail = require('flail');
var hosts = flail.load();
var ret = flail.get('10.21.225.13', 'flail.com');
if (ret) {
// YES flail.com has added
}
How to set a host
Use flail.set
can set a host to local.
var flail = require('flail');
var ip = '127.0.0.1';
var address1 = 'a.com b.com c.com d.com';
var address2 = ['e.com','f.com'];
flail.set(ip, address1);
flail.set(ip, address2);
When the bash exit with no reason
Flail support for backup with $user/.flail/hosts.bak for your hosts;
##How to use this?
if U use this only check localhost setting
var flail = require('flail');
var hosts = flail.load();
// load the hosts files
flail.get('localhost');
Take a test with demo
node test/test.js
##About me
I'm a Web-Developer, living in Hangzhou China.
##How to keep connect with me.
U can post an email or a issue at github
Thank you for install flail~