typicode / json-server

Get a full fake REST API with zero coding in less than 30 seconds (seriously)
Other
72.98k stars 7.02k forks source link

npm run json-server works but not accessible #1258

Open danushk opened 3 years ago

danushk commented 3 years ago

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 ?

ventenni commented 3 years ago

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

xingBaGan commented 11 months ago

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