Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 9, 2023. It is now read-only.
/ ngo Public archive

Ngo是由网易传媒基础技术团队开源的一个类似Java Spring Boot的框架,全部使用Go语言开发,做到快速开发应用

Notifications You must be signed in to change notification settings

NetEase-Media/ngo

Repository files navigation

项目状态

目前项目已经被归档,目前我们重构了ngo项目,让它更加的方便易用,也更为优秀易扩展,更名为easy-ngo. 并且将代码库迁移到了:https://github.com/NetEase-Media/easy-ngo,欢迎大家继续使用。

简介

Ngo是由网易传媒基础技术团队开源的一个类似Java Spring Boot的框架,全部使用Go语言开发,主要目标是:

  • 提供比原有Java框架更高的性能和更低的资源占用率
  • 尽量为业务开发者提供所需的全部工具库
  • 自动加载配置和初始化程序环境,开发者能直接使用各种库
  • 提供预置的健康检查、上线、下线、状态查看等接口

使用

使用 go get -u github.com/NetEase-Media/ngo 命令下载安装

快速开始

main.go

package main
import (
	_ "github.com/NetEase-Media/ngo/pkg/include"
	"github.com/NetEase-Media/ngo/pkg/ngo"
	"github.com/NetEase-Media/ngo/pkg/server/http"
	"github.com/gin-gonic/gin"
)
// go run . -c ./app.yaml
func main() {
	app := ngo.Init()
	s := http.Get()
	s.AddRoute(http.GET, "/", func(ctx *gin.Context) {
		ctx.String(http.StatusOK, "hello world!")
	})
	app.Start()
}

配置文件 app.yaml

service:
 appName: ngo-demo
 clusterName: ngo-demo-local
httpServer:
 port: 8080

更多示例

使用文档

问题反馈

对应bug上报、问题咨询和讨论,可以提交issue

About

Ngo是由网易传媒基础技术团队开源的一个类似Java Spring Boot的框架,全部使用Go语言开发,做到快速开发应用

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 10

Languages

AltStyle によって変換されたページ (->オリジナル) /