Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Middleware sequence fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien Herfray committed Sep 14, 2015
1 parent 55e274b commit 80a91bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zest.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (z *Zest) run(c *cli.Context) {
port := fmt.Sprintf(":%d", z.Context.GlobalInt("port"))
exitTimeout := time.Duration(z.Context.GlobalInt("exitTimeout")) * time.Second

fmt.Println("\n[Zest] Running on " + port)
fmt.Println("\n[Zest] Listening on " + port)

graceful.Run(port, exitTimeout, z.Server)
}
Expand Down Expand Up @@ -152,11 +152,11 @@ func classicInit(z *Zest) error {
return err
}

z.Server.UseHandler(d.Router)

z.Server.Use(NewLogger())
z.Server.Use(NewRecovery())
z.Server.Use(NewLogger())
z.Server.Use(cors.Default())

z.Server.UseHandler(d.Router)

return nil
}

0 comments on commit 80a91bf

Please sign in to comment.