Skip to content

ivaylo-andonov/track-search-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

GraphQL API for track search service

А GraphQl schema exposing queries and mutations that interact with music track data.


Technologies used

Back-end : Nodejs , Typescript, GraphQL , Apollo Server, Prisma, PostgreSQL, Docker


Pre-requisites

You will need to install the following as pre-requisites to getting started:


Getting Started

Once you have the above installed, run the following commands from the root:

  • Install node modules: yarn install
  • Start the database (run postgres docker container, run db migrations + db seed): yarn db:start
  • Start dev server: yarn dev
  • Open browser tab with (http://localhost:4000/) (Apollo GraphQl Studio)

Other useful commands:

  • Stop database and clean up: yarn db:stop
  • Start Prisma studio: yarn db:studio
  • Execute tests: yarn test

Start the project in production

  • Build the project: yarn build
  • Start the server: yarn start

Authentication

You need to authenticate against the GraphQl API with a token, otherwise the schema can not be introspected in Studio. You need to provide a valid HTTP header when send requests like: Authorization : Bearer AUTH_TOKEN

Test auth token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiSm9obiBEb2UifQ.xuEv8qrfXu424LZk8bVgr9MQJUIrp1rHcPyZw_KSsds

For testing purposes only the .env file is committed to the repo, otherwise, it must be git ignored.


External API

The project is powered by external Music Metadata API: https://docs.acrcloud.com/reference/metadata-api

About

GraphQL API for a track search service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published