mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Ensure we don't break the middleware/extensions examples. (#537)
* Ensure we don't break the middleware/extensions examples. * Fixed bug, just like this PR is meant to do. :)
This commit is contained in:
@@ -33,6 +33,10 @@ test:
|
||||
pwd: $GO_PROJECT
|
||||
- make test-datastore:
|
||||
pwd: $GO_PROJECT
|
||||
- go build:
|
||||
pwd: $GO_PROJECT/examples/middleware
|
||||
- go build:
|
||||
pwd: $GO_PROJECT/examples/extensions
|
||||
|
||||
deployment:
|
||||
release:
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
funcServer := server.NewEnv(ctx)
|
||||
funcServer := server.NewFromEnv(ctx)
|
||||
|
||||
funcServer.AddMiddlewareFunc(func(ctx server.MiddlewareContext, w http.ResponseWriter, r *http.Request, app *models.App) error {
|
||||
start := time.Now()
|
||||
|
||||
Reference in New Issue
Block a user