Skip to content

wengchaoxi/go-web-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-web-framework

Example

package main

import (
	"net/http"
	"github.com/WengChaoxi/go-web-framework/framework"
)

func main() {
	core := framework.NewCore()
	core.Get("/", func(c *framework.Context) error {
		c.Json(200, "h3110 w0r1d")
		return nil
	})
	server := &http.Server{
		Handler: core,
		Addr:    ":8080",
	}
	server.ListenAndServe()
}