diff options
author | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-17 22:24:25 -0500 |
---|---|---|
committer | Holden Rohrer <holden.rohrer@gmail.com> | 2019-12-17 22:24:25 -0500 |
commit | c37754420359c9c7f9336e149697ccff7ae8e095 (patch) | |
tree | a299d2523781409db4f8821ceeb48bd16f0af817 | |
parent | 345b07af1434abefbb1c037c6d407a6671f8ae75 (diff) |
added example
-rw-r--r-- | examples/helloworld.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/helloworld.js b/examples/helloworld.js new file mode 100644 index 0000000..ec8ca3b --- /dev/null +++ b/examples/helloworld.js @@ -0,0 +1,7 @@ +const ywot = require('../socket'); // Import direct library + +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 +}); + |