Make sure you have Node.js and npm (Node Package Manager) installed on your system.
-
Install JSON Server globally (if not already installed):
npm install -g json-server
-
Start JSON Server
json-server --watch json-server/db.json --port 3001
-
Endpoint
After starting JSON Server with the above command, you can access your JSON data through the following endpoint: http://localhost:3001/polls