In this section, we will create a MirageJS database that will be used to store the temporary data. Follow these steps to create it:
- Create a new file called db.js file in the src/server folder for the initial loaded data.
- We need to make a JavaScript object the default export for this file, containing the initial data that we want the server to have:
export default {
users: [
{
name: 'Heitor Ramon Ribeiro',
email: '[email protected]',
age: 31,
country: 'Brazil',
active: true,
},
],
};