Skip to content

jain-chetan/companyservice

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published