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

nodejs-ads

v1.0.13

Published

Simple NodeJS AutoDeployment System

Downloads

33

Readme

NodeJS-ADS Build Status

Simple Module for Deploying updates from GitHub using NodeJS.

What is this ??

This is a simple tool used to deploy your package (GitHub Repo) to a Server when a PUSH event has occurred on the Repository. The NodeJS Script runs on a Specfied port and waits for the call. To call the script, we setup a WebHook on Github. Whenever a PUSH event occurs, GitHub POST's the details of the push to a given Payload URL. When the Script receives the payload, it verifies the authenticity of the payload. Once it is verified, the updates are pulled from GitHub repository and all the Node Modules are re-synced. Once the above operations are completed, the app which is running on pm2 is restarted.

Prerequisites

  • A Server with Static IP / Tunneling Service.
  • That Server running on Linux.

Install

npm install nodejs-ads --save

Usage

Example

var updater = require('nodejs-ads')
updater.start("YOUR_SECRET_KEY", PORT);

GitHub Repo Configuration (Setting up Webhook and Secret)

  • Navigate to Repository Settings.
  • Select Webhooks and Click on Add Webhook.
  • Enter the Payload URL as http://YOUR_IP_OR_DOMAIN:PORT/deployment/updatetheapp
    • PORT is the port number used in the updater.start function.
    • Alternatively you can also use TUNNELING_URL/deployment/updatetheapp
  • Change Content Type to application/json.
  • Enter YOUR_SECRET_KEY in the Secret Field.
    • YOUR_SECRET_KEY is the key used in the updater.start function.
  • Select Just the push event under Which events would you like to trigger this webhook?
  • Check the Active Box and click on Add Webhook.

Working

Working

Donations to

  • UPI : pranavms13@apl
  • XMR : 84B2PEVJjenN31h8HcnY4uCFPVcicxvVCAJAYVeYnPLoHkaVGHHWpVxCm6Gn9beEir2CjffgEoXtiDjpAZCmy4ap6uUXT8Y
  • BTC : 3Jg45PbpUNtASL5uvQSeJKZyiExqbB9mbC

Suggestions ?

[email protected]

PR's are welcome.