Giter Site home page Giter Site logo

amazingchow / clean-golang-grpc-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 44 KB

Your best golang gRPC project template to create general gRPC services.

License: MIT License

Makefile 9.52% Go 80.64% Dockerfile 1.23% Shell 8.61%
api golang grpc grpc-golang grpc-service project-template

clean-golang-grpc-project's Introduction

Your best golang gRPC project template to create general gRPC services.

Installation

Only for linux_amd64/darwin_amd64

# install boilr
curl -sL https://github.com/tmrts/boilr/releases/download/0.3.0/install | bash -s
mkdir -p ${HOME}/.local
mv ${HOME}/bin ${HOME}/.local
# initialize template registry
${HOME}/.local/bin/boilr init
# download golang-grpc-service template
cd /path/to
git clone https://github.com/amazingchow/clean-golang-grpc-project.git
# save the golang-grpc-service template
${HOME}/.local/bin/boilr template save -f clean-golang-grpc-project golang-grpc-service-template
# list all templates
${HOME}/.local/bin/boilr template list

Quickstart

# ${RepoBase} is your git repository, ${RepoGroup} is your repository's parent group
mkdir -p ${HOME}/.${RepoBase}/${RepoGroup}
cd ${HOME}/.${RepoBase}/${RepoGroup}
# update project.json to meet your project requirements, and ${RepoName} is your repository's name
${HOME}/.local/bin/boilr template use golang-grpc-service-template ${RepoName}
cd ${HOME}/.${RepoBase}/${RepoGroup}/${RepoName}
# initialize service environment
git init && git add . && git commit -am "First commit"
touch .env.local .env.secret .env.shared
./scripts/compile_pb_using_protoc_docker.sh && make init
# do what you want do...

Take a quick look at the project structure

.
├── devops               // where we place the Dockerfile, etc...
├── etc                  // where we place the dev-config file and prod-config file
├── internal             // where we place the project-related source code
├── protos               // where we place the proto files
├── scripts              // where we place the scripts to build proto files, to test gRPC method, to benchtest gRPC method, etc...
├── .dockerignore        // docker ignore file
├── .gitignore           // git ignore file
├── docker-compose.yml   // docker compose file
├── LICENSE              // license file
├── Makefile             // where we place the make command to manage the projet
├── requirements.txt     // runtime requirements
└── server.py            // main script

License

This project is open sourced under MIT license, see the LICENSE file for more details.

clean-golang-grpc-project's People

Contributors

amazingchow avatar

Watchers

 avatar

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.