diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/helloworld.js | 5 |
1 files changed, 4 insertions, 1 deletions
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 }); |