Git Product home page Git Product logo

begonia's Introduction

Begonia Framework

这个框架是一个Golang语言的简易框架,初衷是原生的net/http包写起来并不爽,想和springboot一样来写接口,现在的完成度还比较低

一个简易的Golang Web框架。

使用指南

Prerequisites 项目使用条件

基于Go 1.11.2

无第三方包

Installation 安装

先拉取这个包

mashiroc@ubuntu:$ go get github.com/MashiroC/begonia

然后import

import "begonia/framework/application"

Usage example 使用示例

package main

import "begonia/framework/application"

func main(){
	app:= application.Init()
	app.Get("/test",func(ctx *application.Context){
		ctx.ResponseString("hello world")
	})

	h:=application.Handle{Uri:"/welcome",Method:"GET",Fun:func(ctx *application.Context){
		ctx.ResponseString("welcome")
	}}

	app.AddHandle(h)

	app.Start(1234)
}

部署方法

go build xxxx

上传至服务器并运行

Release History 版本历史

  • 0.1.0

    上传初始代码

Authors 关于作者

null

电脑没电了

begonia's People

Contributors

mashiroc 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.