2024-12-12 09:53:29 +07:00
2024-12-12 09:53:29 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00
2024-12-12 09:53:29 +07:00
2024-12-12 09:53:29 +07:00
2024-12-12 09:53:29 +07:00
2024-12-12 09:53:29 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00
2024-12-09 09:51:19 +07:00

Setup the project

  1. Mulai edit .env (silakan copy dari .env.template), kemudian edit paramter sesuai environment masing - masing.
cp env.template .env

example:

PUBLIC_HOST=http://localhost
PORT=8080

# Database
DB_USER=admin
DB_PASSWORD=Sasone!102938
DB_HOST=127.0.0.1 
DB_PORT=4407
DB_NAME=westone

JWT_SECRET=--one_api-secret-2019-04-01
SESSION_KEY=Azw1Ds31sW1KP94ffaX2ykHg16SzxL0f2jh21Gh
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
  1. update mod dependency:
go mod tidy
  1. shh ke server dengan PuTTy

  2. Run:

go run ./cmd/main.go
  1. install ekstensi REST Client untuk menjalankan http api, coba run api login westone dari file auth.http
  2. buat folder .vscode dan file settings.json dan buat parameter token dari hasil login.
{
    "rest-client.environmentVariables": {
        "$shared": {
            "token": "Bearer "
        }
    }
}

Running the project

To run the project, you can use the following command:

go run ./cmd/main.go

WRK test performance

  1. ssh ke devone & masuk ke directory
~/perf-test/devcpone
  1. upload script lua
  2. run wrk

Format command: wrk -t -c -ds -s <script name> example:

wrk -t5 -c100 -d30s -s westone-search-patient.lua http://devcpone.aplikasi.web.id:9090

Response API & Error Log Name

Description
No description provided
Readme 537 KiB
Languages
Go 99.3%
Dockerfile 0.4%
Makefile 0.3%