Skip to content

Latest commit

 

History

History
113 lines (77 loc) · 1.68 KB

README.md

File metadata and controls

113 lines (77 loc) · 1.68 KB

20kWave Song Display Player

This feature is an audio player

Table of Contents

  1. API
  2. Requirements
  3. Development

API

URL

localhost:5001/songs/:id Dynamically renders a song based on id of the entrypoint url.

GET

/display/song/:songId

Retrieve a song based on id.

Parameters

Query Params Type
songId number

Response

Name Type
song_id int
song_name string
upload_time int
tag string
song_art_url string
background_light string
background_dark string
waveform_data JSON
song_duration int
comment_id int
comment string
username string
timestamp int
artist_name string

POST

/display/comment/:songId

Add a comment to a song.

Body

Name Type
songId number
comment string
userId number
timestamp dateTime

DELETE

/display/comment/:songId

Delete a comment from a song

Parameters

Query Params Type
songId number
commentId number

PUT

/display/song/:songId

Update a song's name

Parameters

Query Params Type
songId number
songName string

Requirements

  • Node 6.13.1

Installing Dependencies

From within the root directory:

npm install

Development

From within the root directory, do each of the following:

  • Run webpack to build bundle.js
npm run build
  • Start the server at port 5001
npm start