From 6cf560c4be9d7ef700080dc9f5378a9e7849f545 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Wed, 18 Dec 2019 00:39:05 -0500 Subject: finished helloworld --- examples/helloworld.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/helloworld.js b/examples/helloworld.js index ec8ca3b..cc43666 100644 --- a/examples/helloworld.js +++ b/examples/helloworld.js @@ -1,7 +1,10 @@ const ywot = require('../socket'); // Import direct library +const space = require('../space'); +writes = new space.Space(); //Generate a place to store potential writes +writes.adhoc('hello\nworld') // A method to fill internal data with inline code. main = new ywot.Socket(''); // Open socket main.on('open',()=>{ // When socket opens - main.write([[[1,1],[0,0],'!']]); // Tell the server to put an exclamation mark at the topleft of the tile bottomright of the motd + main.write(writes.towrite([8,16])); // Tell the server to write the content of `writes` to }); -- cgit