README
What is it about
Activates/Deactivates the app running on the PaaS Heroku in one go.
Installation
- HerokuSwitch is working with the official Heroku CLI, install it:
npm i -g heroku
- Then install HerokuSwitch using NPM:
npm i herokuswitch --save
- Go to the app's folder in node_modules and open
herokuswitch.js
- Configure the following object:
// CONFIGURATION (must edit)
const cfg = {
app: '', // insert your app's name here (Ex. 'myApp')
resource: '' // choose your process resource type ('Worker' or 'web' )
}
USAGE
Open the terminal. The syntax is:
node herokuswitch -<option>
Choose an option to execute it.
Example: node herokuswitch -off
This turns off the app completely by turning on maintenance mode and deactivates the process resource type in one go.
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!