We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to load and save a JSON file that sits on the same folder as server.js, from a sketch.ks. This is the folder structure
I'm not sure if I should do this in the sketch.js...
... but I'm not sure what the path would be. Or if I should first load the JSON in the server:
var fs = require('fs');
var data = fs.readFileSync('journal.json');
var journal = JSON.parse(data);
and fetch the data from sketch.js.
Is there a tutorial or example that explains this? I've only been able to find Daniel Shiffman's videos but they only refer to loading a JSON file from a public API, where the path is very clear.
Thanks in advance!