English | 简体中文 #####Contact QQ Group:68667333
-Front-end UI framework: element-ui -Background framework: gin -Orm framework: gorm -Casbin authentication: [casbin] (https://gin-gonic.com/zh-cn/docs) -Cache: cache -Configuration: go-ini -Go module proxy: goproxy
Ekgo is a friendly web framework developed based on gin. It integrates jwt login authentication, dynamic routing, casbin authority authentication, code generator, highly code decoupled, self Define data validators, language packs, LRU algorithm cache libraries, and coroutine-based queues, allowing you to focus more time on business development.
-node version> v8.6.0
-golang version >= v1.11
-IDE recommendation: Goland
# Use go.mod
#Enable module support
SET GO111MODULE=on
#GOPROXY environment variable set by the wall
SET GOPROXY=https://goproxy.cn,https://mirrors.aliyun.com/goproxy/,https://goproxy.io,direct
# Install go dependencies
go mod tidy
# Run
go run main
# Cross compile Linux environment
SET GOOS=linux
# Compile
go build main
# Download hot compilation
go get github.com/silenceper/gowatch
#unit test
go test -v -cover
# Run hot compilation
gowatch
``##
go get -u github.com/swaggo/swag/cmd/swag
swagger swag init ``''
####The log output of the nohup deployment can be subcontracted using the log method
## #Switch to the project root directory and set executable permissions, use nohup demo here nohup ./main & #Hot update off kill -l main #Force close pkill main
''
├─ekgo (framework folder)
│ ├─app (the directory contains the core code of the application)
│ ├─├─admin (controller, almost all the logic to handle the request to enter the application is placed in this directory)
│ ├─├─common (public interface)
│ ├─├─middleware (middleware)
│ ├─├─model (data model configuration)
│ ├─├─queue (asynchronous queue task)
│ ├─├─service (interface service layer, generally used to encapsulate data interface operations)
│ ├─├─validate (data verification)
│ ├─boot (the directory contains the boot frame)
│ ├─├─cache (cache)
│ ├─├─casbin (casbin authentication)
│ ├─├─config (configuration)
│ ├─├─db (database setting)
│ ├─├─logger (log setting)
│ ├─├─router (route registration)
│ ├─├─serve (program start service, can be used to start multiple services)
│ ├─├─validate (validator, can be used for data data parameter verification)
│ ├─config (configuration file)
│ ├─docs (swagger document directory)
│ ├─lib (public function package, does not include the realization of business requirements.)
│ ├─resource (resource)
│ ├─router (the directory contains all route definitions of the application)