Skip to content

A practice project to set up a node server with a REST API and sql access

License

Notifications You must be signed in to change notification settings

FinnDoherty/chinook-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chinook-server

requires Node.js

install the node modules with npm install

Setup the sqlite database

install sqlite3 cli tools:

sudo apt-get install sqlite3

create and populate the chinook database included:

sqlite3 --batch database.sqlite3 ".read chinook-db-creation/Chinook_Sqlite.sql"

DB access server

to run the server npm start and navigate to localhost:3000 in a browser

Endpoints

READ endpoints

  • /artists - a list of all the available Artists and the number of Albums they have
  • /artists/:id - artist info including a list of albums and the number of tracks on each one
  • /albums - a list of all the available Albums, their Artist and number of tracks on each
  • /albums/:id - album info including details of artist and a list of tracks
  • /tracks - lists all the tracks
  • /tracks/:id - track info with artist, album and duration info, and which playlists it is part of
  • /playlists - a list of all the saved playlists, and number of tracks on each
  • /playlists/:id - playlist info, name, number of tracks, list of tracks with names, albums and artists

About

A practice project to set up a node server with a REST API and sql access

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published