diff options
author | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-18 00:39:05 -0500 |
---|---|---|
committer | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-18 00:39:05 -0500 |
commit | 6cf560c4be9d7ef700080dc9f5378a9e7849f545 (patch) | |
tree | 87668da3ef7fa2b898d241e6a5cda11e5c712ba1 /examples | |
parent | c090e4911c92c00134542362aec43903f3739764 (diff) |
finished helloworld
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 }); |