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

undyno

v1.0.2

Published

Activates/Deactivates an app running on the PaaS Heroku without wasting free dynos in one go.

Downloads

2

Readme

WHAT IT IS

Activates/Deactivates an app that is deployed on the PaaS platform Heroku without wasting any dynos in one go. Less to write, faster to accomplish.

INSTALLATION

Node package manager NPM is required.

  1. heroku-undyno.js is working with the official Heroku CLI, install it: npm i -g heroku
  2. Then install undyno using NPM: npm i undyno --save
  3. Create a JavaScript file with the following content that loads and sets up the module:
const Heroku = require('./heroku-undyno.js') // imports the module

const undyno = new Heroku({
    app: 'myApp', // the app's name you specified on Heroku
    resource: 'Worker' // the process dyno type (there exist only 'Worker" or 'web')
})

undyno.exec() // executes the code together with the settings made above

Or just copy the demo file and configure.

USAGE

Assuming you created a file called undyno.js in the root folder of your project: Open the terminal. The syntax is: node undyno -<option>

Choose an option to execute it. Example: node undyno -off

This turns off the app completely by turning on maintenance mode and deactivates the process resource (Dyno) type in one go.

METHODS

const undyno = new Heroku(
	app: '<AppNameHere>',
	resource: <'Worker' or 'web'>
})

(required) The arguments configure the options upon creating a new instance. The options are used for the Heroku app. For app use the name of your deployed Heroku app. For resource chose either Worker or web for the dyno process resource type. You may leave this blank and use .config() later on instead.

undyno.config({
	app: '<AppNameHere>',
	resource: <'Worker' or 'web'>
})

(optional) Use this method instead if you haven't set the options yet.

undyno.exec() (required) This method simply executes the code together with the configured options.

OPTIONS

-off Turns off the app on Heroku by turning on maintenance mode and process resource type off.

-on Turns the app on again by turning the maintenance mode off and enables the specific resource type defined in the configuration, see installation.

-log Displays the log of the app in a new terminal window.

-restart Restarts the app on Heroku.

-dynos Looks up the remaining dynos and used up resources.

-update Updates the Heroku CLI (Heroku module required)


If you encounter any errors, don't hesitate to open up an issue, thank you!