blob: 861ce59aeb8998fbffa141a80eb6deeef47ea435 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package app
import (
"os"
"github.com/xlgmokha/x/pkg/log"
"gitlab.com/mokhax/spike/pkg/authz"
"gitlab.com/mokhax/spike/pkg/cfg"
"gitlab.com/mokhax/spike/pkg/srv"
)
func Start(bindAddr string) error {
logger := log.New(os.Stdout, log.Fields{"app": "gtwy"})
mux := authz.HTTP(authz.WithCasbin(), Routes())
return srv.Run(cfg.New(
bindAddr,
cfg.WithMux(log.HTTP(logger)(mux)),
))
}
|