Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

jinfeijie/scf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

腾讯云SCF Go web 框架

支持通用路由的scf开发框架,降低scf开发过程中风格差异带来的心智成本。

使用方式与常规web开发框架无异。

  • demo
package main

import (
	"github.com/jinfeijie/scf"
)

func main() {
	s := scf.New()
	s.SetTrafficMode(scf.TrafficModeGW)
	s.SetMode(scf.RunModeDebug)
	{
		s.ANY("/scf", func(ctx *scf.Context) scf.Reply {
			return ctx.JSON("scf service", map[string]string{
				"version": "1.0.0",
			})
		})
	}
	s.Run()
}