Modify the configuration in config.template.yaml.
After finishing all configuration,create config.yaml file and copy all the content from config.template.yaml.
Make sure the executable is in same directory with config.yaml
Attention:
Don't leak your config.yaml to the public
Configure MySQL.
example:
db:
username: your username
password: your password
dbname: database name
address: localhost
port: 3306
example:
app:
host: 127.0.0.1
port: 8080
Configure the session key for gorilla/sessions, and it must be keep secret.
auth:
session_key: your session key
-
Download Go on your machine.
-
If you have network problem,configure the GOPROXY:
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
- Your database has been set up with the SQL in sql/init.sql
cd dmbe
go build dmbe
Run in the background:
nohup ./dmbe &