Skip to main content

Posts

Showing posts with the label json server

Json-server Api's crud operations

Git-Hub repo with setup guide. https://github.com/typicode/json-server 1) Install json server Please visit the json-server official site and find this command. Install json-server globaly into your system -npm install -g json-server 2) Start json-server with command Open cmd and go to the locaation where .json file present run the this command -npx json-server --watch db.json  3) Delete data with child table data (delete relation record).  Hi! This is not a random error. I found that if there is some kind of connection between elements, then DELETE request will erase both of them: I have a "database": { "users":[ {"id":1, "name": "Bob", "email":"bob@gmailcom", "age": 35}, {"id":2, "name": "Sue", "email":"sue@gmailcom", "age": 32}, {"id":3, "name": "Cloe", "email":"cloe@gmailco...