Skip to content

Commit

Permalink
feat: deploy as Vercel function
Browse files Browse the repository at this point in the history
  • Loading branch information
fedragon committed Jul 2, 2024
1 parent 10ffad9 commit ec509e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/handler.go → api/bookmark.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package internal
package api

import (
"fmt"
Expand Down
3 changes: 2 additions & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/go-chi/chi/v5/middleware"
"github.com/kelseyhightower/envconfig"

"github.com/fedragon/bookmd/api"
"github.com/fedragon/bookmd/internal"
)

Expand All @@ -25,7 +26,7 @@ func main() {

router := chi.NewRouter()
router.Use(middleware.Logger)
router.Get("/bookmarks", internal.Handle)
router.Get("/bookmarks", api.Handle)

server := &http.Server{Addr: config.HttpAddress, Handler: router}
serverCtx, serverStopCtx := context.WithCancel(context.Background())
Expand Down

0 comments on commit ec509e4

Please sign in to comment.