# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# README
Attendance Apps
Prerequisites
- Go installed on your machine.
Getting Started
-
Clone the repository:
git clone https://github.com/dhimweray222/Test-BE-UNINET.git cd Test-BE-UNINET
-
Install dependencies:
go mod download
-
Change Config in .env file
# Server Settings: SERVER_URI=localhost SERVER_PORT=8080 DEFAULT_LIMIT=10 # Database Setting DB_HOST=host DB_PORT=port DB_NAME=db_name DB_USERNAME=postgres DB_PASSWORD=db_password DB_POOL_MIN=10 DB_POOL_MAX=100 DB_TIMEOUT=10 DB_MAX_IDLE_TIME_SECOND=60 # jwt SECRET_KEY=AaBbCcJKLMadhanirAAnNoOPqrstu23VWXYZ SECRET_KEY_REFRESH=AaBbCcJKLMadhaniRAaPqrstu23VWXYZ SESSION_LOGIN=24 SESSION_REFRESH_TOKEN=720 # Location TOKEN_MAPS=37c54fbcd8fb4f
-
Run the application:
go run main.go
-
Open your web browser and visit http://localhost:3000 to see the app in action.
Features
Postman Documentation
https://documenter.getpostman.com/view/23663611/2s9Ykn9Mjr
-
Create User
Endpoint: POST /users Body: { "id": "123456789", "name": "dhim Doe", "email": "[email protected]", "password": "123123123" }
-
Login User
Endpoint: POST /users/login Body: { "email":"[email protected]", "password":"123123123" }
-
Detail User
Endpoint: POST /users/:id Params: { "id":"example_uuid_user", }
-
Check In
Endpoint: POST /attendances Cookies: { "token":"example_token_from_login", }
-
Check Out
Endpoint: POST /attendances/:id Params: { "id":"example_uuid_attendance", }