npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

heilo

v1.0.4

Published

server status monitoring tool made simple

Downloads

21

Readme

heilo, is your server up or down?

Build Status Standard - JavaScript Style Guide

heilo there

If you are looking for a NodeJS-based server status monitoring tool, heilo is for you. It is lightweight, simple to use, and has clean interface. It can be used programmatically as an npm module, or cli tool.

Default behaviour will ping a host every 10 minutes (configurable) to check if it is UP, UP with Error or DOWN.

NOTE: heilo does not come with any notification/reporting functionality. Though heilo provides an interface for you to write your own notification/reporting function. Here is an example on how you can write a simple email notification system using nodemailer and deploy to Now - heilo-mail.

Usage

NOTE: heilo requires Node 6.0.0 and above

Use Programmatically as Module

Install it as dependencies

npm install heilo --save

Use it

const heilo = require('heilo')

heilo('https://localhost', {
  interval: '10m',        // ping interval
  stopLooping = false,    // stop pinging, useful if you want to control the start/stop manually
  report = (error) => {}, // function to report any error (e.g. send email when server down)
  debug = false,          // log every ping result to STDOUT if set to true,
  fetchOptions = { method: 'GET' } // options passed to fetch(url, fetchOptions)
})

Refer to this example for more details on how to write the report function.

Use as CLI

Install it globally

npm install -g heilo

Run it

heilo <absolute_url_path> [options]

Here are some examples of its usage:

heilo http://localhost
heilo http://localhost -i 5m
heilo http://localhost -f ./examples/reporting.js

Options

| Usage | Description | Default value | | ---------------------- | ----------- | ------------------ | | -h, --help | Output usage information | - | | -d, --debug | Debug Mode (log to STDOUT) | false | | -p, --port [port] | Specific port to ping | - | | -i, --interval [interval] | String value of the ping interval (refer to ms module for available values) | '10m' | | -f, --file FILE | .js file that exports a function to report any error (e.g. send email when server down) | - |

Contribute

  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Uninstall heilo if it's already installed: npm uninstall -g heilo
  3. Link it to the global module directory (to use heilo command everywhere): npm link
  4. Once you make some changes, transpile the source code: npm run build
  5. Use heilo command to test any cli changes
  6. Test the Programmatic API: npm run example

Credit

Thanks to projects like micro and serve that gives me inspiration and a head-start on how to write and structure this module.