Giter VIP home page Giter VIP logo

goarch's Introduction

goarch

Golang Clean Architetecture

Update Config

  1. go to folder resources and open file config.json
  2. Update the value based on your environment

Running HTTP

  1. Clone this repo inside your $GOPATH/src/github.com/vickydk
  2. Update config.json
  3. Install all dependency go mod tidy
  4. Try run Application Restful API with make run and access http://localhost:8811

Running gRPC

  1. Clone this repo inside your $GOPATH/src/github.com/vickydk
  2. Update config.json
  3. Install all dependency go mod tidy
  4. Try run Application Restful API with make run-grpc and access localhost:8822

Running gRPC & HTTP

  1. Clone this repo inside your $GOPATH/src/github.com/vickydk
  2. Update config.json
  3. Install all dependency go mod tidy
  4. Try run Application Restful API with make run-app
  5. Access localhost:8822 for GRPC
  6. Access localhost:8811 for HTTP

Check Http Up

Call this url: http://localhost:8811/, if you see response OK so the application already run successfully

Proto File

Prerequisite :

  1. Install protoc version 3.17.3

  2. Install dependency library

    • go get -u google.golang.org/grpc
    • go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
    • go install github.com/golang/protobuf/protoc-gen-go@latest // if cannot install line 17
    • go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
    • go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc

Compile Proto

  1. go to folder pkg/shared/grpc
  2. run this command to compile the proto file ./protoc.sh -p {protofile_name_without.dot.proto, for example ./protoc.sh -p user

License

gorsk is licensed under the MIT license. Check the LICENSE file for details.

Author

VickyDk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.