Skip to content

coroo/go-pawoon-user

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Pawoon User

💡 Create a backend using GoLang for User Profile CRUD (UserID, Email, Name, Password) and Login Process (Username & Password) Process which follow SOLID Principles.

Please read how the app work section for overall flow or view this video below:

Tutorial Run This Application

App Information

This app use gin as a framework, gorm as an ORM and go-swagger as API documentation.

📄 Installation

  1. Go installation:
  1. You need to have database and set it later in .env:
Create your own form-generator database, lets call it `go-pawoon-user`

Install Swagger Library

go get -u github.com/swaggo/swag/cmd/swag

Seeder

go run database/seed.go

Easy Setup & Run Go Pawoon User

For make it easier to do configuration in Go Pawoon User, I create shell script that you can use by type:

./run.sh

If you need to run manual, please see manual handling section

Go Pawoon User Configuration

You need to use this step-by-step for running the app at the first time:

1. Set Up Environment (.env) 
// Used for set-up app environment. For the first setup, you need to change your environment detail. For more information about environment that you need to add, please contact developer.

2. Do Unit Test 
// You can always running unit test by this feature

3. Update Swagger Documentation 
// You use swagger for maintain API restful documentation. You can check it later after running app (4. Run Go Pawoon User) and redirect to your app_link/swagger/index.html

4. Run Go Pawoon User 
// This feature is used for running the app

API Documentation

This feature only can be used after running the app

redirect to this link --> /swagger/index.html

e.g. http://localhost:3002/swagger/index.html

Go Pawoon User Swagger Viewer


♿ Manual Handling

Set Environment

cp .env.example .env

Fulfill your environment setup

Unit Test

go test -coverprofile cp.out -v ./... && go tool cover -html=cp.out

Update Swagger Documentation

swag init

or

{GOLANG_PATH}/go/bin/swag init 
//e.g. /Users/kuncoro.barot/go/bin/swag init

Running App

go run main.go

About

User Microservices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published