Example with GraphiteJS, framework graphql. In this example, you will able to search an artist, select artist, select album, and play the preview track.
Download the example or clone the repo:
Install it and run:
npm install
npm run start:dev
yarn
yarn start:dev
URL default http://localhost:3000
Latest deploy view
The design the architecture is here
yarn **command**
Command | Description |
---|---|
test | Run all test |
coverage | Report coverage the all files. Terminal or folder in .coverage/lcov-report/index.html |
lint | Linting project |
start | Run project production, required build |
start:dev | Run project development |
build | Generate build |
Can you check the graphiql
query getArtist($artist: String!) {
artist(name: $artist) {
_id
name
}
}
query getAlbum($album: String!) {
album(name: $album) {
_id
name
}
}
query getTrack($track: String!) {
track(name: $track) {
_id
name
}
}
query getTracksByAlbum($albumId: String!) {
tracksByAlbumId(id: $albumId) {
_id
name
}
}
{
"artist": "Shakira",
"album": "show",
"track": "Hi",
"albumId": "2cWBwpqMsDJC1ZUwz813lo"
}
Deploy it to the cloud with now (download)
now