aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <holden.rohrer@gmail.com>2019-12-18 21:09:23 -0500
committerHolden Rohrer <holden.rohrer@gmail.com>2019-12-18 21:09:23 -0500
commit89ae45290d744469fbcbf192ebc468712ab3009d (patch)
treefa1de3d815b9c5a8cb0ed462b41405d794d4691e
parentc754b87e56f644bea2947e165705c964bd68bc02 (diff)
fixed socket address and module.exports
-rw-r--r--socket.js4
-rw-r--r--space.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/socket.js b/socket.js
index 949dcdd..7a88ff6 100644
--- a/socket.js
+++ b/socket.js
@@ -27,7 +27,7 @@ class retryws extends EventEmitter{ // a wrapper on ws that retries on failure
class Socket extends retryws {
constructor(world='') { // Takes the name of the world, which can be an empty string.
- let loc = (world == '') ? '' : `/${world}`;
+ let loc = (world == '') ? '' : `${world}/`;
let addr = `wss://www.yourworldoftext.com/${loc}ws/`;
super(addr);
this.on('message', (msg)=>{
@@ -91,4 +91,4 @@ class Socket extends retryws {
}
}
-exports = Socket;
+module.exports = Socket;
diff --git a/space.js b/space.js
index e567733..63b916e 100644
--- a/space.js
+++ b/space.js
@@ -124,4 +124,4 @@ function Space(){ // CLASS
}
-exports = Space
+module.exports = Space