Created a small API that uses Express.js in Node.js to expose an http endpoint that takes an rss url, parses it and returns a list of episodes from that rss feed.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- You must have node installed
- then install the packages as instructed on
Installing
- For the manual test please install Insomnia (i've added the insomnia file, you just need to import the file to Insomnia env)
A step by step series of examples that tell you how to get a development env running
Say what the step will be
npm install
npm start
npm test
- Feeds endpoint is slower one due to MP3 files being installed due to checksum to be calculated. Hence, I'm returing only 5 of the obj from the rss feed.
/feeds
returns -> json = [ { title: 'Episode 1 - abc', checksum: 123, url: 'xyz' }, { title: 'Episode 2 - abc', checksum: 234, url: 'qwe' } ]
- Fast Feed endpoint is a bit more performent even thou we are still doing checksum of the MP3 files. The performance has been improved due to not installing the whole MP3 file, but instead getting the checksum of the specified bytes.
/fast_feed
returns -> json = [ { title: 'Episode 1 - abc', checksum: 123, url: 'xyz' }, { title: 'Episode 2 - abc', checksum: 234, url: 'qwe' } ]
The project has only 2 tests. Please run the following command:
npm test
- Pagination to handle the big rss feed
- Writing more unit tests to see failure, array information etc.
- Versioning of the API
- Improvement on the directory structure (this is something i need to learn :) )
- Define env such as dev, test, prod etc.
- Express.js - The Backend Framework
- Node.js - Backend Language
- Mocha - Test Framework
- Chai - Test Assertian Lib
Aysin Oruz