aboutsummaryrefslogtreecommitdiff
path: root/examples/helloworld.js
diff options
context:
space:
mode:
authorHolden Rohrer <holden.rohrer@gmail.com>2019-12-18 20:57:16 -0500
committerHolden Rohrer <holden.rohrer@gmail.com>2019-12-18 20:57:16 -0500
commit84d292cfdad4249885e43b7123634e5a8dd0ff1f (patch)
tree1f4b3f0b674f85dc033275fb5ad49f19aa7058c7 /examples/helloworld.js
parentcb7d31d863320db9257a619eea0422cc43bb05a4 (diff)
updated socket and space to export the main class
Diffstat (limited to 'examples/helloworld.js')
-rw-r--r--examples/helloworld.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/helloworld.js b/examples/helloworld.js
index cc43666..4984914 100644
--- a/examples/helloworld.js
+++ b/examples/helloworld.js
@@ -1,9 +1,9 @@
-const ywot = require('../socket'); // Import direct library
-const space = require('../space');
+const Socket = require('../socket'); // Import direct library
+const Space = require('../space');
-writes = new space.Space(); //Generate a place to store potential writes
+writes = new 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 = new Socket('helloworld'); // Open socket at yourworldoftext.com/helloworld
main.on('open',()=>{ // When socket opens
main.write(writes.towrite([8,16])); // Tell the server to write the content of `writes` to
});