json-server icon indicating copy to clipboard operation
json-server copied to clipboard

npm run json-server works but not accessible

Open danushk opened this issue 3 years ago • 2 comments

I have following in my package.json.

`
"scripts": {

"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"json": "json-server --watch db.json --port 5000"

}, ` and when i run "npm run json" i get the output shown below in the screenshot

https://i.imgur.com/RQayaiw.png

But when accessed through the browser - i get the following - not accessible - connection refused.

screenshot is here

How to fix this ?

danushk avatar Jul 07 '21 14:07 danushk

Any word on this? I'm getting the same issue.

ventenni avatar Sep 19 '21 23:09 ventenni

I can open the json-server in brwoser . Then I want to use ngrok to conect the server, but it can't work.

xingBaGan avatar Nov 29 '23 03:11 xingBaGan