https://github.com/eljefedelrodeodeljefe/probe
Probe stuff.
https://github.com/eljefedelrodeodeljefe/probe
check http ping probe
Last synced: about 1 month ago
JSON representation
Probe stuff.
- Host: GitHub
- URL: https://github.com/eljefedelrodeodeljefe/probe
- Owner: eljefedelrodeodeljefe
- Created: 2017-02-02T03:14:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-08T14:42:28.000Z (about 9 years ago)
- Last Synced: 2026-04-16T20:06:02.970Z (2 months ago)
- Topics: check, http, ping, probe
- Language: JavaScript
- Size: 25.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Probe [](https://travis-ci.org/eljefedelrodeodeljefe/probe)
> Ping and probe stuff
## Usage
Ping something once
```js
const Ping = require('probe').Ping
const config = {
host: 'google.com',
path:'/'
}
const expectResponse = {
code: 200
}
const ping = new Ping()
ping.start(config, expectResponse, (err, diff) => {
if (err) {
return console.error(err)
}
console.log(diff)
})
```
Probe something conitnuously
```js
const probe = require('probe')
const config = {
name: 'google-ping',
time: {
second: 50
},
host: 'google.com',
path:'/'
}
const expectResponse = {
code: 200
}
probe.add(config, expectResponse)
probe.on('google-ping', () => {
console.log('received ping')
})
```
## License
MIT