From c37754420359c9c7f9336e149697ccff7ae8e095 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Tue, 17 Dec 2019 22:24:25 -0500 Subject: added example --- examples/helloworld.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 examples/helloworld.js (limited to 'examples') 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 +}); + -- cgit