Giter Club home page Giter Club logo

beemongo's Introduction

beemongo

基于beego框架,mongodb数据库的简单golang服务器框架

已集成特性

  1. beego 一个使用 Go 的思维来帮助您构建并开发 Go 应用程序的开源框架
    https://beego.me/
  2. mongo-go-driver mongodb官方go驱动
    https://github.com/mongodb/mongo-go-driver
  3. casbin 访问控制
    https://casbin.org/en/
  4. beego-pongo2 go服务端渲染用模板语言 https://github.com/oal/beego-pongo2

demo中有哪些实现?

  1. 通过扫描domains目录自动创建表和索引
  2. mongodb数据库的crud
  3. mongodb事务
  4. mongodb视图
  5. mongodb复杂关联分页查询
  6. beego统一异常处理
  7. beego拦截器,访问权限控制
  8. 使用pongo2做页面渲染

待处理的问题

  1. golang的版本管理工具,实在是难用,老出问题,导致git上没有使用包的当前版本信息
  2. 考虑怎么接入微服务架构

解决部分问题

  1. 依赖管理直接使用 go mod

注意事项

  1. pongo2模板语法不能正确初始化,需要注释掉beego.go中的模板注册方法
func initBeforeHTTPRun() {
	//init hooks
	AddAPPStartHook(
		registerMime,
		registerDefaultErrorHandler,
		registerSession,
        // 不注释这个的话启动服务会使用beego自带模板引擎,因此模板语法会报错
		// registerTemplate,
		registerAdmin,
		registerGzip,
	)

	for _, hk := range hooks {
		if err := hk(); err != nil {
			panic(err)
		}
	}
}

beemongo's People

Contributors

shampoo6 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.