0.0.3 • Published 10 years ago
hosttool v0.0.3
hosttool
install
for script
npm install hosttoolfor cmd
npm install hosttool -gusage
for script
const HostTool = require('hosttool');
const tool = new HostTool();
tool.list()
.then(hosts => {
console.log(hosts)
})
tool.add('127.0.0.1 wiliex.com #wiliex')
.then(()=> {
console.log('host is added')
})
tool.del('wiliex.com')
.then(()=> {
console.log('host is deleted')
})
tool.query('wiliex.com')
.then(host => {
console.log(host)
}) for cmd
query host by hostname
hosttool query wiliex.comlist all the hosts
hosttool listdelete host by hostname
hosttool del wiliex.comadd host
hosttool add '127.0.0.1 wiliex.com #wiliex'