1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-14 02:33:03 +02:00
kratos/examples/blog
2021-09-14 19:32:59 +08:00
..
api/blog/v1 add v2.0.0 2021-07-08 13:54:09 +08:00
cmd/blog refactor: move plugins to contrib dir (#1399) 2021-09-01 13:40:14 +08:00
configs trace config (#956) 2021-05-27 19:18:14 +08:00
internal fix: examples lint error (#1454) 2021-09-09 20:45:08 +08:00
.gitignore examples (#748) 2021-03-05 23:49:25 +08:00
generate.go fix example (#755) 2021-03-11 23:42:28 +08:00
LICENSE examples (#748) 2021-03-05 23:49:25 +08:00
Makefile fix example blog makefile (#1296) 2021-08-05 09:24:39 +08:00
README.md typo(examples/blog): change ”make run“ to ”kratos run“ (#1474) 2021-09-14 19:32:59 +08:00

How to run this blog example server

  1. You should ensure that your mysql server is running.
  2. Ensure that the database named testdb has been created, otherwise you should execute the following database script:
create database testdb;
  1. Modify the configs/config.yaml file and add your mysql information in the data source:
data:
  database:
    driver: mysql
    source: root:password@tcp(127.0.0.1:3306)/testdb?parseTime=True
  1. Run your blog server:
$ go generate ./...
$ kratos run