// Integrate router into one controller router_Controller.Hub(app)
// Listens and serves incoming http requests // on http://localhost:8080. app.Listen(":8988") }
Database connection
We use XORM to connect database.
Install
1 2 3 4 5 6 7
# install driver for mysqsl go get -u github.com/go-sql-driver/mysql
# go get xorm.io/xorm # install xorm go get xorm.io/builder # install builder go get xorm.io/reverse # install reverse tool, this can help you generate code automatically accroding to the database we already have.