timdows / MMM-JsonTable

A module for the MagicMirror project which creates a table filled with a list gathered from a json request.
MIT License
25 stars 31 forks source link

load a local Json File #21

Closed kk98kk closed 3 years ago

kk98kk commented 3 years ago

Someone already had that problem with the local JSON File, but I cannot fix it for me. It always says Awaiting for json data... The file is located in the folder MMM-JsonTable as a test.json- file and url in the config.js is 'file:///home/pi/MagicMirror/modules/MMM-JsonTable/test.json'. Does anyobdy have a solution?

My test.json-file looks by the way

{ "items": [ { "name": "Watt", "value": "234.6" }, { "name": "Test", "value": "3 kwH" } ] }

kk98kk commented 3 years ago

Got it finally. The right url is : 'http://127.0.0.1:8080/modules/MMM-JsonTable/abc.json'