vending-machine-control-system

module
v0.0.0-...-32905a6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT

README

vending-machine-control-system

Go Microservice Template

This is the code repository for Vending Machine System Control, simple API to handle vending machines.

Build, test, and deploy robust golang microservices

About the project

The repo is used to handle vending machine as a central systems.

Reference

Getting started

Prerequisites
Setup
  1. Clone the repository and navigate to the root directory of the project:
git clone https://github.com/samannsr/vending-machine-control-system.git
cd vending-machine-control-system
  1. Create a .env file in the env directory of the project and copy the local.env environment variables.

You can run the following command to build and start the containers:

docker-compose up -d --build

OR

  1. Install the dependencies:
make dep
  1. Run the development server:
make run_dev

This will start the http server on port 8080. You can customize the ports by setting the HTTP_PORT environment variable.

Testing

To run the tests, use the following command:

make test

To generate a test coverage report, use the following command:

make test_coverage
Linting

To lint the code, use the following command:

make lint

This will run all available linters, including Go lint, Dockerfile lint, and YAML lint.

Building

To build the binary, use the following command:

make build

This will create a binary in the out/bin directory. You can run the binary with the following command:

make run
Cleaning

To clean the build artifacts and generated files, use the following command:

make clean

This will remove the bin and out directories, as well as any build-related files.

Notes

Jump to

Keyboard shortcuts

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