Coder Social home page Coder Social logo

github-clonner / jooxclone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pondpiu/jooxclone

0.0 2.0 0.0 1.43 MB

creating a lyrics showing music player as a part of interviewing process

JavaScript 59.62% CSS 3.57% HTML 31.57% Ruby 3.60% PowerShell 1.65%

jooxclone's Introduction

#JooxClone part of an application for internship

#Installation

  • Clone the project
  • go to root directory
cd jooxClone
  • install depedencies
npm install
  • configure mongoDB URI

#mongoDB the project need an instance of mongoDB to function

setting environment variable pointing to mongoDB

for windows

SET MONGOLAB_URI="mongodb://example:[email protected]:55482/example"

for *nix

export MONGOLAB_URI="mongodb://example:[email protected]:55482/example"

#Running

  • go to root directory
cd jooxClone
  • starting node server (default port 8080)
node server.js 

#Formatting

the lyrics are stored and communicated with LRC format :

[00:12.00]Line 1 lyrics
[00:17.20]Line 2 lyrics
[00:21.10]Line 3 lyrics
...
[mm:ss.xx]last lyrics line

https://en.wikipedia.org/wiki/LRC_(file_format)

#API

GETTING A LYRICS

Path: /musics/lyrics/{mid}
HTTP Method: GET
Return Data: Lyric object (JSON)
Description: Get a Lyric object according to the given music ID parameter in the URI

URI parameter

  • mid(int): Music ID

Example: /musics/lyrics/1

{  
  "message":{  
    "header":{  
      "status_code":200  
    },  
    "body":{  
      "lyric":{  
        "lyric_id" : "1",  
        "lyric_body": "[00:15.72]You are, my fire  
        [00:20.48]The one, desire  
        [00:25.47]Believe  
        [00:27.88]When I say  
        [00:30.60]That I want it that way  
        ",  
        "lyric_language" : "EN",  
        "version" : "1.0"  
      }  
    }  
  }  
}  

ADDING A LYRICS

Path: /musics/lyrics
HTTP Method: POST
Return Data: status(JSON)
Description: Upload a lyric to mongoDB

URI Parameter

  • lyric_id (int): lyric ID
  • lyric_body (string): lyrics in LRC format
  • lyric_language (string): lyrics's language code (ex. EN)
  • version (string): lyrics's version

Example: /musics/lyrics

{
  message: 'Lyric added.'
}

GETTING A SONGS
Path: /musics/songs
HTTP Method: GET
Return Data: Array of Song objects (JSON)
Description: Get a list of song available

Example: /musics/songs

  "message": {
    "header": {
      "status_code": 200
    },
    "body": {
      "song": [
        {
          "id": 1,
          "title": "I want it that way",
          "artist": "Backstreet boy",
          "url": "https://example.com/song/iwantitthatway.mp3",
        },
        {
          "id": 2,
          "title": "All star",
          "artist": "Smashmouth",
          "url": "https://example.com/song/allstar.mp3",
        }
      ]
    }
  }
}

ADDING A SONG
Path: /musics/songs
HTTP Method: POST
Return Data: status(JSON)
Description: added a song object to mongoDB

URI Parameter

  • id (int): song ID
  • title (string): song's title
  • artist (string): song's artist
  • url (string): song's url (.mp3)

Example: /musics/songs

{
  message: 'Songs added.'
}

jooxclone's People

Contributors

pondpiu avatar

Watchers

James Cloos avatar Patrick Luzolo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.