Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

DoNewsCode/core-demo

Repository files navigation

This repository hosts a working demo of github.com/DoNewsCode/core.

Highlight

  • Shows how to use package core to bootstrap a service.
  • A go kit service with mysql at /app/user.
  • A gin service with redis at /app/book.
  • CLI commands to orchestrate services.
  • swagger doc at /docs
  • prometheus metrics at /metrics
  • pprof info at /debug
  • healthcheck at /live and /ready

Prerequisite

  • mysql listening at localhost:3306, with a database called app created.
  • redis listening at localhost:6379

Command

Export a sample configuration file:

go run main.go config init

Run database migration:

go run main.go database migrate

Run database migration rollback:

go run main.go database migrate --rollback

Run database seeding:

go run main.go database seed

Seed redis (custom command):

go run main.go seedRedis

Start the server:

go run main.go serve

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages