restrauntService

command module
v0.0.0-...-1f772b9 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

Restraunt Service

Below are the required information what tools/packages used and how to run this project.

Developed using these tools

golang   mysql    docker

Packages used
  • go-chi - Router used instead of default one
  • sqlx - Provides useful options on top of standard database/sql package
  • go-chi render -The render package helps manage HTTP request / response payloads.
  • gotenv - Loading variable from .env
How to run this project

Note: Before running this project you need to install docker and docker-compose in your system. As this project relies on docker to run mysql database.

Change the dockerfile name in docker-compose.yaml in dockerfile path.

Note: For development use devapi.Dockerfile for production use api.Dockerfile

Then run the command

docker-compose up -d

Docker will download the required images and run the containers.

check the api docs

This project uses swaggerui for api documentation, Navigate to http://localhost:8080/swaggerui/

How db migration works

This project uses golang-migrate directly inside docker so at the time of initailly running the project for very first time the migrate tool will directly create the required tables inside the db.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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