А GraphQl schema exposing queries and mutations that interact with music track data.
Back-end : Nodejs , Typescript, GraphQL , Apollo Server, Prisma, PostgreSQL, Docker
You will need to install the following as pre-requisites to 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
- Build the project:
yarn build
- Start the server:
yarn start
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.
The project is powered by external Music Metadata API: https://docs.acrcloud.com/reference/metadata-api