Create your own webapp status page with a Twitter account and this tiny Node.js app from your friends at ACT.md.
At ACT.md, we use Twitter to notify our users of upcoming maintenance or, heaven forbid, an unplanned outage. node-system-status shows those messages in a clean and professional way, distinguishing between issues (red), maintenance notices (yellow), and all-clear messages (green) using the hashtags #issue, #maintenance, and #ok.
Assuming you have Node.js and foreman installed.
- Clone the repo and
npm install
the dependencies - Copy
config.orig.json
toconfig.json
and customize - Copy
twitter_credentials.orig.json
totwitter_credentials.json
and customize nf start
and visit http://localhost:5000
- Clone the repo
- Open a terminal window in that directory and install the npm dependencies
npm install
- Install the Heroku Toolbelt if you plan on deploying on Heroku, or just install foreman to test locally.
npm install -g foreman
- Copy
config.orig.json
toconfig.json
and update it with your own values.
application_name
: The name of your application, e.g.ACT.md
twitter_handle
: Twitter username you use to post application updates, e.g.actmdstatus
number_of_tweets
: Total number of status tweets to show, e.g.10
help_email
: E-mail address your users should contact if they need additional assistancecopyright
: Official name for your copyright notice, e.g.Accountable Care Transactions, Inc
- Create a Twitter API Key and Access Token for node-system-status to use
- Sign into the Twitter Application Management site and click "Create a new app," the "app" being your new Twitter-based application status website.
- Fill out the form. Leave Callback URL empty.
- With your app created, click the "API Keys" tab. You'll see your API Key and API Secret waiting for you.
- At the bottom, click "Create my access token."
- Wait for the token to appear. You'll see an Access Token and Access Token Secret.
- Copy
twitter_credentials.orig.json
totwitter_credentials.json
and update it with the above keys & secrets.
consumer_key
: Your Twitter API Keyconsumer_secret
: Your Twitter API Secretaccess_token_key
: Your Twitter Access Tokenaccess_token_secret
: Your Twitter Access Token Secret
- Start your app
foreman start
- Visit http://localhost:5000
- Post status messages to your Twitter account. Messages must include a recognized hashtag to appear.
- #ok (renders in green)
- #maintenance (renders in yellow)
- #issue (renders in red)
- Clone the repo
heroku login
andheroku create
- Set all the application variables. (See step 5 below)
git push heroku master
and open in a browser.
- Install the Heroku Toolbelt and create a Heroku account, if you don't have one.
- Clone the repo and open a terminal window in that directory
- Log into Heroku
heroku login
- Create a new Heroku app instance
heroku create
- Set all the application variables
heroku config:set APPLICATION_NAME=...
heroku config:set TWITTER_HANDLE=...
heroku config:set NUMBER_OF_TWEETS=...
heroku config:set HELP_EMAIL=...
heroku config:set COPYRIGHT=...
heroku config:set TZ=<your_timezone>
heroku config:set TWITTER_CONSUMER_KEY=...
heroku config:set TWITTER_CONSUMER_SECRET=...
heroku config:set TWITTER_TOKEN_KEY=...
heroku config:set TWITTER_TOKEN_SECRET=...
- Deploy to your Heroku instance
git push heroku master
- Note the URL that's displayed in the response and open that in your browser.
- The "What is this site?" text is modeled closely on GitHub's status page text.