Don’t pass in surreal conf options to fibre server
This commit is contained in:
parent
ee2f34bef0
commit
9b25a75a36
3 changed files with 4 additions and 4 deletions
4
glide.lock
generated
4
glide.lock
generated
|
@ -1,10 +1,10 @@
|
|||
hash: 0402d462f75cf177f62e8a0c786da7e9ca6a22535e6412965b600141842d6dae
|
||||
updated: 2016-10-29T14:57:11.583277704+01:00
|
||||
updated: 2016-11-04T11:11:57.580487578Z
|
||||
imports:
|
||||
- name: github.com/abcum/cork
|
||||
version: 2d785aed8e7cc57a3b6741042a9b421a9d81fc13
|
||||
- name: github.com/abcum/fibre
|
||||
version: cb521c4d2cdc231c3efa08aef9cc7c731741c2a8
|
||||
version: bc5ac776be0fd0e64d9546099a9f14e91652b600
|
||||
subpackages:
|
||||
- mw
|
||||
- name: github.com/abcum/logrus
|
||||
|
|
|
@ -23,6 +23,7 @@ func conf() fibre.MiddlewareFunc {
|
|||
return func(h fibre.HandlerFunc) fibre.HandlerFunc {
|
||||
return func(c *fibre.Context) error {
|
||||
|
||||
c.Set("KV", cnf.Settings.DB.Base)
|
||||
|
||||
return h(c)
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ func Setup(opts *cnf.Options) (err error) {
|
|||
|
||||
log.WithPrefix("web").Infof("Starting web server on %s", opts.Conn.Web)
|
||||
|
||||
s := fibre.Server(opts)
|
||||
s := fibre.Server()
|
||||
|
||||
routes(s)
|
||||
s.SetWait("15s")
|
||||
|
@ -36,7 +36,6 @@ func Setup(opts *cnf.Options) (err error) {
|
|||
|
||||
// Setup middleware
|
||||
|
||||
s.Use(conf()) // Setup conf
|
||||
s.Use(auth()) // Setup auth
|
||||
s.Use(mw.Logs()) // Log requests
|
||||
s.Use(mw.Fail()) // Catch panics
|
||||
|
|
Loading…
Reference in a new issue