KMA Score API written in Go
There are three ways you can use:
-
Install MariaDB (10.6.4 or above)
- You can install MySQL instead of MariaDB
-
Insert your data into database
- Tip: You can dump it by using KMA Score Extractor
-
Create/Edit enviroment file
# .env
PORT = 8000 # Change port here- Run locally
go run main.go- Or you can build
go build -o /kma-score-api2. Using our Docker image
- Pull and run Meilisearch docker image
- Read Meilisearch document for more information.
- Pull Docker image
docker pull arahiko/kma-score-api:latest- Run
docker run -p 8080:8080 --name kma_score \
-e PORT=8080 DB_USERNAME=username DB_PASSWORD=password \
DB_NAME=database_name DB_HOST=localhost DB_PORT=3306 \
MEILISEARCH_HOST=your-host MEILISEARCH_PORT=7700 \
MEILISEARCH_API_KEY=meilisearch_api_key \
arahiko/kma-score-api:lastest- Or you can use your env file when run docker container
docker run -p 8080:8080 --name kma_score --env-file path/to/.env arahiko/kma-score-api:latest docker-compose -f docker-compose.yml up -dGET /student/{StudentId}| Parameter | Type | Description |
|---|---|---|
StudentId |
string |
Required |
GET /subjectsPOST /add-score/{StudentId}| Parameter | Type | Description |
|---|---|---|
StudentId |
string |
Required |
GET /student/?query={query}| Parameter | Type | Description |
|---|---|---|
query |
string |
Required |