Skip to content

Latest commit

 

History

History
80 lines (55 loc) · 1.38 KB

README.md

File metadata and controls

80 lines (55 loc) · 1.38 KB

Company Service

A microservice to handle companies. It provides the following operations: • Create • Patch • Delete • Get (one)

Run Locally

Clone the project

  git clone https://github.com/jain-chetan/companyservice.git

Go to the project directory

  cd companyservice

Install dependencies

  go mod tidy
  go mod vendor

Start the server

  go run main.go

golangci-lint - Check linting issue

  golangci-lint run

Run the APIs by hitting on Postman

{POST}/createtoken - generates token for a user to authenticate {POST}/companies - to add company details {GET}/companies/{id} - to get the company details based on the uuid provided {PATCH}/companies/{id} - to update the company details based on the uuid provided {DELETE}/companies/{id} - to delete the company details based on the uuid provided

Docker

Build the Docker image using the docker build command.

  docker build -t companyservice .

Once the image is built, you can run a Docker container based on that image using the docker run command:

docker run -p 8080:8080 companyservice

Tech Stack

Golang - go 1.18

PostgreSQl DB

Postman

test results on postman

Alt text Alt text Alt text Alt text Alt text Alt text Alt text