git clone <project_Link>
cd <project_directory>
npm install
npm start
in cmd, go to the main directory,
run code .
To add an movie object
fetchApi("http://localhost:8080/movie", {method: "POST", body: { name: "jyo12" }})
To delete an movie object
fetchApi("http://localhost:8080/movie/{id}", {method: "DELETE"})
To fetch an movie object
fetchApi("http://localhost:8080/movie/{id}", {method: "GET"})
to update a movie object
fetchApi("http://localhost:8080/movie/{id}", {method: "PUT", body: {name: "MJ"}})
to get all the list
fetchApi("http://localhost:8080/movie", {method: "GET"})
to flush/delete database
fetchApi("http://localhost:8080/movie/flush", {method: "DELETE"})
append
.then(resp => resp.json()).then(obj => console.log(obj))
example
fetchApi("http://localhost:8080/movie", {method: "GET"}).then(resp => resp.json()).then(obj => console.log(obj))