package main

import (
	"github.com/gogf/gcache-adapter/adapter"
	"github.com/gogf/gf/os/gsession"
	_ "youngmini_server/boot"
	_ "youngmini_server/router"

	"github.com/gogf/gf/frame/g"
)

func main() {
	// 设置session存储于redis
	g.Server().SetConfigWithMap(g.Map{
		"SessionStorage": gsession.NewStorageRedis(g.Redis()),
	})

	adapter := adapter.NewRedis(g.Redis())
	g.DB().GetCache().SetAdapter(adapter)

	g.Server().Run()
}
