Skip to content

RESTful Music Library API built using Node, Express and MySQL. Allows users to perform CRUD operations on artists and albums in a database.

Notifications You must be signed in to change notification settings

greenchul/music-library

Repository files navigation

Music Library API

About

The Music library API project as part of the Manchester Codes curriculum (back-end module).

The project is live here

The project implements RESTful routes and allows users to perform CRUD (Create, Read, Update, Delete) operations on artist and albums in a MySQL database.

The project was built with Node and Express and uses SQL to interact with the database.

Test Driven Development was used throughout the project with Mocha, Chia and Supertest used for itergration testing.

Screenshot of database schema

Installation

  • Pull a MySQL image and run the container
  • Clone this repo
  • Change in to repo directory
  • Run npm install
  • Create a .env file and add local variables:
    • DB_PASSWORD
    • DB_NAME
    • DB_USER
    • DB_HOST
    • DB_PORT
    • PORT
  • If you wan to run the tests create a .env.test file with the same environmental variables changing the DB_NAME variable.
  • Run npm start to start the project
  • Run npm test to run the tests

Routes

Artists

  • Create: POST to /artist
  • Read all: GET to /artist
  • Read single: GET to /artist/:id
  • Update: PATCH to /artist/id
  • Delete: DELETE to /artist/:id

Albums

  • Create: POST to /artist/id/album
  • Read all: GET to /album
  • Read single: GET to /album/:id
  • Update: PATCH to /album/:id
  • Delete: DELETE to /album/:id

About

RESTful Music Library API built using Node, Express and MySQL. Allows users to perform CRUD operations on artists and albums in a database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published