add server

This commit is contained in:
2024-05-13 04:28:51 +07:00
parent 00f28e3f7b
commit 2c7aedd5c2
5 changed files with 66 additions and 0 deletions
+11
View File
@@ -2,9 +2,20 @@ package main
import (
"cake_crm/internal/models/storage/storage_file"
"cake_crm/internal/services/server_web"
"context"
)
func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
storage := storage_file.NewStorageFile("resources/db.json")
_ = storage
server := server_web.NewServer(storage, 8080)
err := server.Run(ctx)
if err != nil {
panic(err)
}
}