Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrueger12 committed Sep 28, 2024
1 parent 4dd7540 commit e04fa56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ services:
cache:
container_name: cache
image: ko.local/semantic-cache-a8044edf3c2796d6a5951c230da20a70:latest
restart: always
ports:
- 8080:8080
depends_on:
Expand Down
9 changes: 5 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func main() {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
log.Logger = log.With().Caller().Logger()

// Create a new Fiber instance
app := fiber.New(fiber.Config{
JSONEncoder: sonic.Marshal,
JSONDecoder: sonic.Unmarshal,
Expand All @@ -35,11 +36,11 @@ func main() {
// Provide a minimal config
app.Use(healthcheck.New())

// Check the cache to see if there is any data
app.Get("/get", handlers.HandleGetRequest)
// Route to check the cache to see if there is any data
app.Get("/check", handlers.HandleGetRequest)

// Put data in the cache
app.Post("/post", handlers.HandlePutRequest)
// Upsert data in the cache
app.Post("/write", handlers.HandlePutRequest)

// Create a channel to listen for OS signals
c := make(chan os.Signal, 1)
Expand Down

0 comments on commit e04fa56

Please sign in to comment.