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

app-watcher

v1.1.6

Published

A simple serverless program to watch your application. If your application gets down, module send email notification

Downloads

1

Readme

Node App Watcher

A simple node module which acts as a serverless program to monitor your application status.

**It will send notification, once your application status changes(UP or DOWN)

Installation and setup

Using npm:

$ npm i -g npm
$ npm i --save app-watcher

Init Method:

watcher.start(config<object>);

Config object should contains following properties

  1. email: "gmail-id" Email id for sending notification(From mail id)
  2. pass: "gmail-password"
  3. to: ["email-id", "email-id"] add one or multiple gmail ids for getting notification from watcher
  4. appUrl: - Application URL to be monitored
  5. emailContent - this is a optional parameter, you can change subject and content of notification email

| Key | Type |Optional| Description | |----------------|-----------|--------|-----------------------------------| | email | String |false| Email id for sending notification. Email id should be gmail account id. | | pass | String |false| Password of gmail account. | | to | Array[String] or String|false| Here you add your notification receivers list | | appUrl | String |false| Application url checking status about application | | emailContent | Object |true| This is a optional parameter. You can change email content.|

Email Content

emailContent is a optional parameter, it has two attributes

  1. success {subject (String), body (String or HTMLString)}

  2. failure {subject (String), body (String or HTMLString)}

| key | Type |Optional| Description | default values | |---------------|-----------------|--------|---------------------------|---------| | emailContent.success.subject| String|true| Optional parameter. You can add you success email subject| App Status - Started | | emailContent.success.body| String or HTML String|true| Optional parameter. You can add you success email body| Your application started at Mon Mar 01 2018 16:50:02 GMT+0530 (IST) | | emailContent.failure.subject| String|true| Optional parameter. You can add you failure email subject|App Status - Terminated| | emailContent.success.body| String|true| Optional parameter. You can add you failure email body|Your application terminated due to [Reason]|

Email Notication

We are using node mailer for sending emails. So you can add multible to email ids

Gmail account configuration

Turn on gmail less secure option for sending emails through nodemailer. https://nodemailer.com/usage/using-gmail/

Examples

watcher.js


var watcher = require("app-watcher");

//default method
watcher.start({
    from: "*****@gmail.com",
    pass: "***********",
    to: ["****@gmail.com", "****@hotmail.com", "*****@domain.com"],
    appUrl: "http://application.com/"
});

(or)

watcher.start({
    from: "*****@gmail.com",
    pass: "***********",
    to: ["****@gmail.com", "****@hotmail.com", "*****@domain.com"],
    appUrl: "http://application.com/",


    emailContent: {         //optional parameter
        success: {
            subject: "",
            body: ""
        },
        failure: {
            subject: "",
            body: ""
        }
    }
});
$ node watcher.js;

Support