Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3655

json-server request not found

$
0
0

I can't get index value or URLs but the whole JSON file only.

There is no log.

Can you help me understand what I did wrong or don't know?

Run server

--watch/-w can be omitted, JSON Server 1+ watches for file changes by defaultJSON Server started on PORT :3000Press CTRL-C to stopWatching db.json...♡( ◡‿◡ )Index:http://localhost:3000/Static files:Serving ./public directory if it existsEndpoints:http://localhost:3000/actions

Call api

curl http://localhost:3000/actions/btn1_on_url/indexNot Foundcurl http://localhost:3000/actions{"actions": {"btn1_on_url": [      {"index": 0,"urls": [],"enabled": false      }    ]  }}

json serverhttps://www.npmjs.com/package/json-server


Viewing all articles
Browse latest Browse all 3655

Trending Articles