/hackernewscmd

Command line app to read top Hackernews posts

Primary LanguageJavaScript

Command line app to read top Hacker News posts

Read top Hackernews posts right from your command line.

How to use?

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.

For the nerds

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.

Run in local

Clone the repo

$ cd hackernewscmd
$ npm install
$ node hackernews.js --post 12

Run tests

$ npm test

License

MIT

Author: @SoorajChandran Date: 5 Dec 2017