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

slacktivity-monitor

v1.0.0

Published

Monitor changes to sites through Slack

Downloads

5

Readme

Slacktivity Monitor

Slacktivity Monitor provides a simple, self-hosted, solution for web monitoring. When a change has been detected on a website you're monitoring, slacktivity-bot will let you know through a message in Slack. Think of it as a very barebones, open source, version of services like Pingdom.

Some Highlights:

  • Monitor for any changes or for specific search terms.
  • Send change notifications (with diffs) directly to a Slack channel of your choosing.
  • Pretty web UI!
  • Check for changes on any interval.

Installation

The best way to install Slacktivity Monitor is through npm:

npm install -g slacktivity-monitor

This will install Slacktivity Monitor to your global node_modules folder.

Database Configuration

Slacktivity Monitor uses PostgreSQL for it's database. It's easy to get started with, especially for Mac users who can install it through Homebrew using:

brew install postgres

Once you have Postgres installed, navigate to the folder containing the slacktivity_db file. This is the slacktivity-monitor folder contained in your global node-modules folder. If you don't know where your node-modules folder is, you can use the npm list -g command. On the Mac, this is usually /usr/local/lib/node_modules/slacktivity-monitor.

Once you're in that folder, run the following command:

createdb slacktivity && psql -d slacktivity -f slacktivity_db

This will create a new database that's configured properly for Slacktivity Monitor. You'll also need to setup a .env file which contains the environment variables that tell Slacktivity Monitor how to connect to the database. Here's what mine looks like on a test installation:

PGDATABASE='slacktivity'

PGHOST='localhost'

PGPORT='5432'

PGUSER=''

PGPASSWORD=''

You'll obviously need to change those values as necessary. It's also worth noting that the .env file is hidden on the Mac. If you're not sure how to work with hidden files, this is a good primer.

The .env file should be placed in the node-modules/slacktivity-monitor/bin directory, alongside the slacktivity-monitor executable.

Starting the App

You can start Slacktivity Monitor with the command: slacktivity-monitor

The command accepts one argument, a port number. If you specify a port number, it will run on that port. Otherwise, it will default to 3000.

Once the app is running, you should be able to access the web UI by visiting http://localhost:port, for example, http://localhost:3000.

Thanks

I'd like to give a special shout-out to my awesome employer, The CompoZed Lab at Allstate. Slacktivity Monitor was originally a project for one of our Open Source days, and it wouldn't be a reality otherwise. ❤️