echo-template

module
v0.0.0-...-a91912b Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT

README

ECHO TEMPLATE

Application which can ...

RUN APPLICATION ON DOCKER

  • Step 1: Install Docker. Docs Link

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

INSTRUCTION >> fill the empty values, from this:

# docker.application.env
...
# DATABASE SQL
...
DATABASE_POSTGRES_NAME=""
DATABASE_POSTGRES_USERNAME=""
DATABASE_POSTGRES_PASSWORD=""
...

to this:

# docker.application.env
...
# DATABASE SQL
...
DATABASE_POSTGRES_NAME="db_name_example"
DATABASE_POSTGRES_USERNAME="db_username_example"
DATABASE_POSTGRES_PASSWORD="db_password_example"
...
  • Step 3: Run docker compose build
# OR `docker-compose --env-file environments/docker.application.env build`
docker compose --env-file environments/docker.application.env build
  • Step 4: Run docker compose up
# OR `docker-compose --env-file environments/docker.application.env up -d`
docker compose --env-file environments/docker.application.env up -d

RUN APPLICATION ON DEV ENVIRONMENT

Run this command

make start-dev

DOCUMENTATION

See in folder docs OR run on Postman below

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

NOTE

  • Number 1: make sure you do all step in installation guide
  • Number 2: the server should be listening on localhost:<PORT>
    NOTE: you can see the <PORT> in docker-compose.yml on golang_container's ports
# docker-compose.yaml
version: "3.9"
services:
  app:
    container_name: golang_container
    tty: true
    build: .
    ports:
      # <PORT>:<CONTAINER-PORT>
      - 8081:8080
...

Jump to

Keyboard shortcuts

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