Skip to content

taledo/top-artists-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Top Artists

Welcome to the Top Artists App Project. The project is split into folders, named appropriately for the client and server. Follow the installation instructions below.

Installation

Top Artists App requires Node.js v6+ to run.

Server (API)

Simply fire up a terminal window and run the following commands from the project root.

$ cd server
$ npm install && npm start

The Server should now be running on Port 3000. To test this, fire up Postman (or your browser) and navigate to: http://localhost:3000/topArtists

Client

Once again, fire up a terminal window and run the following commands from the project root.

$ cd client
$ npm install && npm start

The client should now be running, and should've opened up a tab in your browser, but if not, you can navigate to http://localhost:3001

Docker

The server app has a Dockerfile included, and you can build a docker container using docker-machine and docker-build locally.

Testing

There are some basic tests set-up for the server API project, to access just run the following commands from the root.

Note: Using some 3rd party libraries including: Mocha, Chai and Async.

$ cd server
$ npm test

TODO

The following are items of work needed to better improve the codebase of this project:

Server

  • More unit tests, including failing scenarios etc.
  • More validation around the LastFM API and data

Client

  • Apply more DRY principals and abstraction with methods
  • Add unit tests

Notes

Whilst using the Last FM API, I have noticed some odd behaviours at times with the limit and page params. For example, consider these URL. If you hit this URL, you will receive more than 5 results, however the attributes shows the perPage attribute as 5, although it's not respecting it.

http://ws.audioscrobbler.com/2.0/?method=tag.gettoptracks&tag=david bowie&format=json&limit=5&page=4&api_key=d3f706c99f731811d7da46348c32bcc2

If you hit another page (e.g. on either side of this, page 3 or 5), then it will respect it.

http://ws.audioscrobbler.com/2.0/?method=tag.gettoptracks&tag=david bowie&format=json&limit=5&page=5&api_key=d3f706c99f731811d7da46348c32bcc2

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published