Open LordoCreations opened 3 years ago
code: const scratch = require("node-scratch-client"); // const fetch = require("node-fetch"); Commented out to improve loading times. Uncomment if needed.
console.log("Successfully initialized external server components") console.log("Establishing connection to scratch...")
// Session validation const Client = new scratch.Client({ username: , password: , });
// Setup const projectID = '582530103';
console.log("Connection to servers established!")
// Session start and event loop Client.login().then(() => { let cloud = Client.session.createCloudSession(projectID);
cloud.connect().then(() => { cloud.on("set", variable => { console.log(variable) //console.log("Variable changed to " + variable.value); }); });
});
code: const scratch = require("node-scratch-client"); // const fetch = require("node-fetch"); Commented out to improve loading times. Uncomment if needed.
console.log("Successfully initialized external server components") console.log("Establishing connection to scratch...")
// Session validation const Client = new scratch.Client({ username:,
password: ,
});
// Setup const projectID = '582530103';
console.log("Connection to servers established!")
// Session start and event loop Client.login().then(() => { let cloud = Client.session.createCloudSession(projectID);
});