summaryrefslogtreecommitdiff
path: root/pkg/app/app.go
blob: a8dedc1038da157f717fb61888c8fd2f3eb2b91d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package app

import (
	"gitlab.com/mokhax/spike/pkg/authz"
	"gitlab.com/mokhax/spike/pkg/cfg"
	"gitlab.com/mokhax/spike/pkg/srv"
)

func Start(bindAddr string) error {
	mux := authz.HTTP(authz.WithCasbin(), Routes())
	return srv.Run(cfg.New(
		bindAddr,
		cfg.WithMux(mux),
	))
}