Skip to content

Commit

Permalink
Merge pull request #2 from gaarf/downtime
Browse files Browse the repository at this point in the history
support for HN downtime
  • Loading branch information
gaarf committed Jan 6, 2014
2 parents a18980d + 628e43f commit 9d77885
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion newsyc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ list.on('keypress', function(key, item){
console.log("Fetching news...");

require("hn.js").home(function(err, items) {
if(err) return console.error(err);
if(err || !items.length) {
console.error(err || "HN is probably down :-(");
process.exit(1);
return;
}

items.forEach(function(o){
news[o.id] = o;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "term-hackernews",
"version": "0.1.0",
"version": "0.2.0",
"description": "Command line reader for Hacker News",
"main": "newsyc.js",
"bin": {
Expand Down

0 comments on commit 9d77885

Please sign in to comment.