website-v2 icon indicating copy to clipboard operation
website-v2 copied to clipboard

how can i use local json

Open xiao8cn opened this issue 9 years ago • 2 comments

async asyncData ({ params }) { let { data } = await axios.get('~static/test.json') return data }

errmsg: (node:4796) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: connect ECONNREFUSED 127.0.0.1:80

xiao8cn avatar Jun 16 '17 01:06 xiao8cn

@xiao8cn Did you end up figuring this one out?

dericksozo avatar Jul 09 '17 13:07 dericksozo

I have the exact same problem with local json files. How was this problem solved?

maziarz avatar Oct 11 '17 18:10 maziarz