Home

Awesome

This project is not maintained and supported and is kept for archival purposes and possible maintainable forks. As an alternative you may take a look at: GanjoorService

Ganjoor API

CircleCI

Local Development

Create .env file in the root with this contents:

NODE_ENV=development
AUTH0_DOMAIN=ganjoor.auth0.com
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=

Then:

$ yarn
$ yarn dev

Development Docker

If you just want to run a docker container locally to host the API and the Database for you:

$ yarn
$ yarn build
$ docker-compose up

You'll see a bunch of errors at first, because it takes a bit of time for the MySQL container to start up (due to the large db dump file). As soon as it has started up, the API container will connect to it and you'll see the message:

Server started at port 4003

At that point you can head to http://localhost:4003/ to checkout the API. You can also make the containers run in the background by cancelling the current process and running:

$ docker-compose up -d

Production Docker

$ docker build ganjoor-api .
$ docker run ganjoor-api --env AUTH0_DOMAIN=... --env AUTH0_CLIENT_ID=... --env AUTH0_CLIENT_SECRET=...

API Documentation

Head to http://localhost:4003/api-docs to read the API documentation.

Sponsors

License

This software is released under the MIT License.