百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

morningo

> 编程语言
开源

gin webapp 项目骨架

389 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

gin webapp 项目骨架

MorningGo : Gin WebApp Project Skeleton

中文文档

A Web develop project skeleton base on Gin which just for reference.

More efficiency,

Faster and clear,

Easier to deploy

Suitable for simple project. ko、kit、go-micro、kite are better choice for the middle and large project.

Environment Requirements

  • GO >= 1.8

Installation And Run

Via moroingo installer or use docker

Install

go get github.com/chenhg5/morningo-installer
cd $GOPATH/src
$GOPATH/bin/morningo-installer --project-name web

Load Dependency

bash
cd web
make deps

Test

make test

Graceful Restart

make restart

Run It

make

visit by browser: http://localhost:4000/api/index

Deploy

First build the executable file

make build # for Linux
make cross # for mac/windows

Then put files of the build in your server and set the path of log and static file(html/css/js),and run the executable file.If 80 port is not allowed to use,consider the nginx proxy,or use the gin middleware gin-reverseproxy instead, which has some example in routers.go. When the project start running, it will generate the pidfile in the root path of the project. Excute the following command to update your project.

kill -INT $(cat pid) && ./morningo # graceful stop the process and restart

Project Structure

…

What`s in the box

HTTP (based on Gin)

  • Router
  • Middleware
  • Controller
  • Request
  • Response
  • View
  • Session

Frontend

  • Go template

Security

  • Authentication
  • Authorization
  • Encryption
  • Hash

Digging Deeper

  • Dancer Command
  • Cache System
  • Error and Log
  • Schedule

Database

  • Mysql
  • Mongodb
  • Redis

ORM(based on gorm)

test

  • Api test

Example

https://github.com/chenhg5/morningo/blob/master/controllers/MainController.go

Project Dependency

  • web framework:github.com/gin-gonic/gin
  • orm:github.com/jinzhu/gorm
  • redis:github.com/go-redis/redis
  • mysql:github.com/go-sql-driver/mysql
  • wechat:github.com/silenceper/wechat
  • schedule:github.com/robfig/cron

Benchmark

wrk -c100 -d30s -t4 http://localhost:4000/api/index

Running 30s test @ http://localhost:4000/api/index
  4 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     4.03ms    4.17ms  72.72ms   89.95%
    Req/Sec     7.40k     1.67k   11.20k    67.75%
  884816 requests in 30.03s, 107.17MB read
  Non-2xx or 3xx responses: 884816
Requests/sec:  29462.96
Transfer/sec:  3.57MB

TODO

  • Logger
  • Test
  • Cache/Session
  • Queue of task
  • Read & Write Connections
  • Redis cluster
  • Profiling(Laravel/Swoole;beego)
  • Command tool
  • Interaction command env
  • Fast CRUD Generator

ChangeLog

  • Add Reverse Proxy
  • Fixed the path
  • Add session/cache and Auth middleware
  • Add test
  • Add graceful restart
  • Add schedule module
  • Add installer of project
  • Add access.log and error.log
  • Add database transcation

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gogogolang

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言