As discussed in the previous chapter, json-server persists all data in db.json. When you add a user, they’re written to this file. When you delete a user, they’re removed from it.
During testing, you might delete several users or all of them. If you ever need to restore the original data, copy and paste the following into the db.json file in your project root:
{ "users": [ { "id": "1", "firstName": "Emily", "lastName": "Johnson", "email": "emily.johnson@example.com", "company": { "name": "Dooley, Kozey and Cronin", "title": "Sales Manager" }, "address": { "address": "626 Main Street", "city": "Phoenix", "state": "Mississippi" } }, { "id": "2", "firstName": "Michael", "lastName": "Williams", "email": "michael.williams@example.com", "company": { "name": "Spinka - Dickinson", "title": "Support Specialist" }, "address": { "address": "385 Fifth Street", "city": "Houston", "state": "Alabama" } }, { "id": "3", "firstName": "Sophia", "lastName": "Brown", "email": "sophia.brown@example.com", "company": { "name": "Schiller - Zieme", "title": "Accountant" }, "address": { "address": "1642 Ninth Street", "city": "Washington", "state": "Alabama" } }, { "id": "4", "firstName": "James", "lastName": "Davis", "email": "james.davis@example.com", "company": { "name": "Pagac and Sons", "title": "Research Analyst" }, "address": { "address": "238 Jefferson Street", "city": "Seattle", "state": "Pennsylvania" } }, { "id": "5", "firstName": "Emma", "lastName": "Miller", "email": "emma.miller@example.com", "company": { "name": "Graham - Gulgowski", "title": "Quality Assurance Engineer" }, "address": { "address": "607 Fourth Street", "city": "Jacksonville", "state": "Colorado" } }, { "id": "6", "firstName": "Olivia", "lastName": "Wilson", "email": "olivia.wilson@example.com", "company": { "name": "Pfannerstill Inc", "title": "Research Analyst" }, "address": { "address": "547 First Street", "city": "Fort Worth", "state": "Tennessee" } }, { "id": "7", "firstName": "Alexander", "lastName": "Jones", "email": "alexander.jones@example.com", "company": { "name": "Dickens - Beahan", "title": "Web Developer" }, "address": { "address": "664 Maple Street", "city": "Indianapolis", "state": "Delaware" } }, { "id": "8", "firstName": "Ava", "lastName": "Taylor", "email": "ava.taylor@example.com", "company": { "name": "Nikolaus Inc", "title": "Chief Executive Officer" }, "address": { "address": "1197 First Street", "city": "Fort Worth", "state": "Rhode Island" } }, { "id": "9", "firstName": "Ethan", "lastName": "Martinez", "email": "ethan.martinez@example.com", "company": { "name": "Gorczany - Gottlieb", "title": "Legal Counsel" }, "address": { "address": "466 Pine Street", "city": "San Antonio", "state": "Louisiana" } }, { "id": "10", "firstName": "Isabella", "lastName": "Anderson", "email": "isabella.anderson@example.com", "company": { "name": "Pollich - Hilpert", "title": "Chief Financial Officer" }, "address": { "address": "1964 Oak Street", "city": "New York", "state": "Utah" } }, { "id": "11", "firstName": "Liam", "lastName": "Garcia", "email": "liam.garcia@example.com", "company": { "name": "Considine - Torp", "title": "Web Developer" }, "address": { "address": "576 Fifth Street", "city": "Denver", "state": "South Dakota" } }, { "id": "12", "firstName": "Mia", "lastName": "Rodriguez", "email": "mia.rodriguez@example.com", "company": { "name": "Miller, Schowalter and Wisozk", "title": "Business Analyst" }, "address": { "address": "1627 Sixth Street", "city": "Jacksonville", "state": "West Virginia" } } ]}