## Setup the project 1. Mulai edit ```.env``` (silakan copy dari ```.env.template```), kemudian edit paramter sesuai environment masing - masing. ```bash 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= ``` 2. update mod dependency: ```bash go mod tidy ``` 3. shh ke server dengan PuTTy 4. Run: ```bash go run ./cmd/main.go ``` 5. install ekstensi REST Client untuk menjalankan http api, coba run api login westone dari file ```auth.http``` 6. 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: ```bash go run ./cmd/main.go ``` ## WRK test performance 1. ssh ke devone & masuk ke directory ``` ~/perf-test/devcpone ``` 2. upload script lua 3. run wrk Format command: wrk -t -c -ds -s