microservice_go_packer

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 Packer and Docker

Instructions

  • You need to install the Packer.
  • With the Packer installed, access the project directory.
  • To do the image build docker configured with Packer, type the following command:
    packer build template-packer.json
  • To run the Docker image, type the following command:
    docker run -p 8080:8080 barbbecker/calculator-go:0.1
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