Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/api/httpserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Server struct {

// New creates a new Server, initializes it and returns it.
func NewHttpServer(p ProcessFunc) *Server {
api := &Server{processFunc: p}
api := &Server{processFunc: p, App: app.New()}
api.Use(logger.New())
api.Post("/listen", api.requestHandler)
return api
Expand Down
14 changes: 14 additions & 0 deletions internal/api/httpserver_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package api

import (
"io"
"testing"
)

func TestNewHttpServer(t *testing.T) {
fn := func(r io.ReadCloser) error {
return nil
}

NewHttpServer(fn)
}