fiber-template

module
v0.0.0-...-fce7651 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2024 License: MIT

README

FIBER TEMPLATE

Application which can ...

INSTALLATION FOR DOCKER

  • Step 1: Install Docker. Docs Link

  • Step 2: Copy docker.application.env.example to docker.application.env in environment folder

INSTRUCTION >> fill the empty values, from this:

# docker.application.env
...
# DATABASE SQL
...
DATABASE_MYSQL_NAME=""
DATABASE_MYSQL_USERNAME=""
DATABASE_MYSQL_PASSWORD=""
...

to this:

# docker.application.env
...
# DATABASE SQL
...
DATABASE_MYSQL_NAME="db_name_example"
DATABASE_MYSQL_USERNAME="db_username_example"
DATABASE_MYSQL_PASSWORD="db_password_example"
...

INSTALLATION FOR LOCAL

  • Step 1: Install Golang. Docs Link

  • Step 2: Run These Commands

$ go mod download
$ go mod tidy
$ go mod verify
  • Step 3: Install Wire
$ go install github.com/google/wire/cmd/wire@latest
  • Step 4: Copy (env).application.env.example to (env).application.env in environment folder

INSTRUCTION >> fill the empty values, from this:

# (env).application.env
...
# DATABASE SQL
...
DATABASE_MYSQL_NAME=""
DATABASE_MYSQL_USERNAME=""
DATABASE_MYSQL_PASSWORD=""
...

to this:

# (env).application.env
...
# DATABASE SQL
...
DATABASE_MYSQL_NAME="db_name_example"
DATABASE_MYSQL_USERNAME="db_username_example"
DATABASE_MYSQL_PASSWORD="db_password_example"
...

RUN APPLICATION ON DOCKER

Run this command to start

$ make docker-start

Run this command to stop

$ make docker-stop

RUN APPLICATION ON LOCAL

Run this command to start

# on environment (development)
$ make start-dev

Run this command to stop

Ctrl + C

DOCUMENTATION

  • Postman (Docker Environment)

Run in Postman

  • Postman (Local Environment)

Run in Postman

TEST COVERAGE

  • Step 1: Install Mockery
$ go install github.com/vektra/mockery/v2@v2.20.0
  • Step 2: Run this command
$ make test-cover

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL