Adding httprouter dependency to manage endpoints. Adding our routes to routes.go file facilitating endpoints management and adding POST /v1/movies and GET /v1/movies/:id endpoints. Updating main.go file removing ServeMux and add httprouter instead in app structure. Creating movies.go file to manage create and show movie endpoint.

This commit is contained in:
Maxime Delporte
2025-10-10 16:15:30 +02:00
parent 4342a8df0d
commit e0931223e4
6 changed files with 77 additions and 8 deletions

2
go.mod
View File

@@ -1,3 +1,5 @@
module greenlight.craftr.fr
go 1.25.1
require github.com/julienschmidt/httprouter v1.3.0 // indirect