In order to execute this project it is needed to execute a json server as backend. Below follow the steps to configure:
Pre-requirement: npm installed.
- create a backend folder;
- access the new backend folder;
- Type command : npm init -y;
- Type command : npm i json-server;
- create a db.json file with the following structure:
{
"todos": [
{
"id": 1,
"task": "Adding base structure"
},
{
"id": 2,
"task": "Setting up backend server"
}
]
}
- Type the command: json-server --host --watch db.json