TODO : use database instead of slice
# Install mux router
go get -u github.com/gorilla/muxgo build
./MainGET moviesGET movies/{id}DELETE movies/{id}POST movies/
# Request sample
{
"title": "Mari Pulang",
"rating": "5.6",
"year": 2019,
"actor": {
"name": "Rahmatullah",
"age": 22
}
}PUT movies/{id}
# Request sample
{
"title": "Mari Pulang Bersama",
"rating": "5.6",
"year": 2019,
"actor": {
"name": "Rahmatullah aka matx",
"age": 22
}
}
Muh Rahmatullah