The Collaborative Core API is supported with Golang and contains the following services:
Company Services
Campus Services
Talent Services
Community Services
- Requirements
- Package Dependencies
- Run Program
- Unit Testing
- Submission to Devcode
- Development Guide
- Project Status
- Author
- github.com/gin-gonic/gin
- gorm.io/gorm
- gorm.io/driver/mysql
- github.com/joho/godotenv
- github.com/cosmtrek/air
Dev
-
Using Local Machine (Windows)
-
Create new database (on MYSQL) as
<database_name>
-
Copy
.env.example
to.env
- Update
MYSQL_DBNAME
configuration as<database_name>
- Update
MYSQL_PASSWORD
configuration as<your_mysql_password>
- Update
-
Download dependencies from
go.mod
andgo.sum
go mod download
-
Start the program
go run main.go
-
Open the path on your local machine
http://localhost:3030/api/
-
-
Using Docker
-
Copy
.env.example
to.env
-
Build the Backend API Service docker image. If you don't specify the
<tag>
, it will be tagged aslatest
by defaultdocker build -t <image_name>:<tag> .
-
Configure
docker-compose.yaml
, adjust the script below according to your built docker image... backend-api-service: image: <image_name>:<tag> restart: always ports: - 8080:3030 ...
-
Run
docker-compose.yaml
file, it may take a few minutes and re-attempts. It works fine, solely wait for the[SERVER] Server to be run on http://0.0.0.0:3030/api
comes outdocker-compose -f docker-compose.yaml up
-
Open the path on your local machine
http://localhost:8080/api/
-
- TODO HERE
- TODO HERE
-
Download dependencies from
go.mod
andgo.sum
go mod download
-
Install
github.com/cosmtrek/air
modulego install github.com/cosmtrek/air@latest
-
Run the program using
github.com/cosmtrek/air
moduleair
- Project is: in progress
Name | GitHub |
Rava Naufal Attar | sivaren |
Suryanto Tan | SurTan02 |
Steven Alexander Wen | loopfree |