Issue:
UnhandledPromiseRejectionWarning: Error: Data must be an object
You can find my JSON FILE here Click this link to view my JSON file
I am unable to start my json-server because the REST API provides a JSON Array, whereas json-server requires a JSON Object to function. Can json-server be run with a JSON Array?
If yes, please advise on what changes I need to make in my JSON file to accommodate this.
npm json-server --port 3000 --watch db.json
This command triggers the following error message:
Error: Data must be an object. Found object. For reference, check out https://github.com/typicode/json-server.
How can I modify my JSON file to work with json-server?