Oops, filename.json doesn't seem to exist | Creating filename.json with some default data

36 Views Asked by At

I am learning API testing, so I have created JSON file, and trying to create an API which will display the data found in JSON file into browser, but getting

Oops, filename.json doesn't seem to exist
Creating filename.json with some default data

I navigated via CMD to where the JSON file is present, and then ran command: json-server --watch abcd.json but getting below output:

  Loading abcd.json
  Oops, abcd.json doesn't seem to exist
  Creating abcd.json with some default data

  Done

  Resources
  http://localhost:3000/posts
  http://localhost:3000/comments
  http://localhost:3000/profile

  Home
  http://localhost:3000

I was expecting output to get below URL, which if i run i would get the content of JSON file on browser:

http://localhost:3000/abcd

here abcd is the JSON file which i created.

0

There are 0 best solutions below