Socket
Book a DemoInstallSign in
Socket

betterpinger

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

betterpinger

A better solution for uptime by doing polling for server & client

2.0.7
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

betterpinger

A better solution for uptime by doing polling for server & client.

Table of Content

Installation

npm install betterpinger --save

Docs

core

A function that loaded via require("betterpinger"). To use this function, Put at request handler. Example:

server.on("request", core);

core.connect

A function that connects to a server & communicate with your betterpinger server. In this function, You need to provide some parameters so it works perfectly. They are:

  • hostname [Required] for requesting to the provided hostname.
  • port for requesting to the different port of hostname.
  • path for requesting to the provided path.
  • headers for setting this client headers.
  • protocol for requesting in different protocol.

core.connect events

  • connect event will emitted when BetterPinger connected to your BetterPinger server.
  • disconnect event will emitted when BetterPinger disconnected from your BetterPinger Server.

Example

Server Example

const http = require("http");
const betterpinger = require("betterpinger");

http.createServer(betterpinger).listen(3000);

Client Example

const { connect } = require("betterpinger");

connect({
	hostname: "localhost",
	port: 3000,	
});

Community

Discord

Keywords

uptimerobot

FAQs

Package last updated on 07 Mar 2021

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.