This repository contains the source code for the Learning Junkie REST API.
- Haskell
- Servant (API)
- PostgreSQL (DB)
- Diagrams (Certificate Generation)
- Amazon S3 (Storage)
- Docker
- GitHub Actions (CI/CD)
First and foremost, clone the repository on your local machine:
$ git clone https://github.com/junkidesu/learning-junkie-api
To build and run the application locally, ensure that the following are installed:
Stack and Cabal can be installed either independently or with the GHCup tool.
The application uses PostgreSQL for the database and Amazon S3 for storage. Thus, a running PostgreSQL server (either local or remote), as well as a publicly readable Amazon S3 Bucket, are required.
See .env.sample
to see the environment variables that must be set. You can either place them in a .env
file, or supply them directly to the executable.
At the root of the repository, run the following:
$ stack install
$ learning-junkie-api-exe
You may start the application along with a local PostgreSQL server using Docker Compose.
$ docker compose -f docker-compose.dev.yml up
You still need to provide the necessary environment variables, though.
Swagger documentation of the API is available at https://learning-junkie-api-main.onrender.com/swagger-ui.