Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 1.11 KB

README.md

File metadata and controls

66 lines (49 loc) · 1.11 KB

grpc_identity

Build a Simple Blog Service with gRPC and goFiber

TODO

REST API

  • Configure a database with entgo
  • User CRUD API
  • Blog CRUD API
  • Configure Edges Between User and Post
  • User Login API with JWT

gRPC

  • Support GRPC
  • gRPC Interceptor for JWT
  • Apply gRPC-gateway

ETC

  • GitHub Actions CI
  • Error Handle with logging
  • Swagger Docs

Build From Source

Prerequisite

  • Go version 1.20 or greater
  • MySQL
  1. Clone this Repository
git clone `{this repository URL}`

cd grpc_identity
  1. Configure .env file
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
DB_NAME=blog

# grpc or http
SERVER=grpc
HTTP_PORT=
GRPC_PORT=
GATEWAY_PORT=
GATEWAY_ENABLED= # If you want to enable, grpc-gateway write `true`
  1. Build and Run
make build

make clean build // If the codes updated, use this command

make test // Check the Unit test

./main // Run Go Binary File

Swagger Docs

If you configure the server to http in .env, you can check swagger docs in http://localhost:{your_http_port}/swagger/index.html.