Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

web-uptimer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-uptimer

Uptiming Websites

  • 1.5.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

NPM Banner

NPM version NPM downloads

Install

$ npm i web-uptimer

Setup

const up = require('web-uptimer');
const uptimer = new up.Uptimer({ timeout: 30000}); //5m
//You can use also client: 'node-fetch' or 'got'

Logging

const uptimer = new up.Uptimer({ timeout: 1000, pingLog: true }) //logging on the console when ping url

const uptimer = new up.Uptimer({ timeout: 1000, pingLog: true, pingMessage: '{url} was pinged'}) //https://example.com was pinged | {url} = the url who is pinged

Example

/**
 *  Pinging url every 8s
 *  Stopping after 4s
 *  Only Example */

const uptimer = new up.Uptimer({ timeout: 8000, client: 'node-fetch' });

uptimer.add('https://example.com', '123456789123456789') //id/name: string

uptimer.startAll();

setTimeout(() => {
    uptimer.substring('https://example.com', '123456789123456789');
    uptimer.restart('123456789123456789'); //update fetching
}, 4000)

Get all

uptimer.allById('123456789123456789').then(array => console.log(array));

uptimer.all().then(array => console.log(array));

Clients

Endpoints

ValueParamOutput
addurl, idtrue
substringurl, idtrue
allByIdidarray
startidtrue
stopidtrue
restarttrue
allarray
startAlltrue
stopAlltrue
restartAlltrue

Contact

Youtube, Discord

Keywords

FAQs

Package last updated on 08 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc