aboutsummaryrefslogtreecommitdiff
path: root/internal/api/new.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/new.go')
-rw-r--r--internal/api/new.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/internal/api/new.go b/internal/api/new.go
index 3e949d3..d5f2b12 100644
--- a/internal/api/new.go
+++ b/internal/api/new.go
@@ -1,5 +1,17 @@
package api
+import "net/http"
+
func New(config Config) *Server {
- return &Server{}
+ mux := http.NewServeMux()
+
+ server := &http.Server{
+ Addr: config.Address,
+ Handler: mux,
+ }
+
+ return &Server{
+ config: config,
+ http: server,
+ }
}