An API for managing institutions, courses and students
Ensure you have the following installed:
- Java (version 17)
- PostgreSQL Database (and optionally, PgAdmin)
- Docker (if you'd like to run the application using docker)
The application can be run in two ways:
If you're using an IDE like IntelliJ, you can run the app using the 'Play' button
Otherwise, you can run the app on your terminal:
-
Navigate to your project directory
cd /path/to/your/project
-
Run:
gradlew bootRun
-
First build your application to produce a .jar file
gradlew bootJar
-
You will find the .jar file in the build/libs directory
/your-project |---build |---libs |---your-application.jar |---build.gradle
-
Build the image
docker build -t <your-image-name>:<tag> .
-
Run the container based on the image, adding environment variables. Note that docker adds a tag (latest) at the end if one is not defined
docker run -p 8080:8080 \ -e DATABASE_URL=<your-db-url> \ -e DATABASE_USERNAME=<your-db-username> \ -e DATABASE_PASSWORD=<your-db-password> \ <your-image-name>:<tag>
Note: If you're on Linux/MacOS, use ./gradlew
instead of gradlew
The database schema used:
The following resource contains a published collection of the API Endpoints for Uni API: