microservice_go_dockerfile

command
v0.0.0-...-d7ce89a Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 5 Imported by: 0

README

Microservice Calculator in Golang using Docker/Dockerfile

Instruções

  • Access the project directory and type the following command:
    docker build -t calculator .
  • To run the bash script, type in the terminal:
    chmod a+x script_run_microservice.sh
  • This command give the permission to run the bash script:

  • Now, you can to run the following command and the golang calculator will be available:

    ./script_run_microservice.sh
  • To run, you will 3 options:

1 - Start the calculator

2 - Stop the calculator

3 - To check the calculator status (RUNNING | NOT RUNNING)

Available Endpoints
Sum
    http://localhost:8080/calc/sum/{firstNumber}/{secondNumber}
Sub
    http://localhost:8080/calc/sub/{firstNumber}/{secondNumber}
Div
    http://localhost:8080/calc/div/{firstNumber}/{secondNumber}
Mult
    http://localhost:8080/calc/mult/{firstNumber}/{secondNumber}
History
    http://localhost:8080/calc/history
  • firstNumber matches the first number to be calculated

  • secondNumber matches the second number to be calculated

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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