Read top Hackernews posts right from your command line.
Install Node js. Hackernewscmd requires Node.js v4+ to run.
Follow this link for detailed step by step installation process.
Once you have installed node and npm you are ready to download and install the hackernewscmd using below command.
$ npm install -g hackernewscmd
Once installation is successful run the following command to get the top posts.
$ hackernews --posts 10
Above command will get the top 10 posts. You can specify any number here less than 100.
Server - Node.js Testing - Mocha with Chai.
Important Packages used
request - to make http requests top hackernews api
optimist - for processing command line arguments
cacheManager - for the basic caching of files in case of repeated requests.
Clone the repo
$ cd hackernewscmd
$ npm install
$ node hackernews.js --post 12
Run tests
$ npm test
MIT
Author: @SoorajChandran Date: 5 Dec 2017