[go: up one dir, main page]

Skip to content

Simple Blog CRUD API with GoFiber, Entgo, MySQL and gRPC

Notifications You must be signed in to change notification settings

inchori/simple_golang_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Simple Blog CRUD API with GoFiber, Entgo, MySQL and gRPC

Resources

Stars

Watchers

Forks

Packages

No packages published