You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{ WebSocketServer, table }=require("@finos/perspective");constfs=require("fs");// Start a WS/HTTP host on port 8080. The `assets` property allows// the `WebSocketServer()` to also serves the file structure rooted in this// module's directory.consthost=newWebSocketServer({assets: [__dirname],port: 8080});// Read an arrow file from the file system and host it as a named table.constarr=fs.readFileSync(__dirname+"/superstore.lz4.arrow");awaittable(arr,{name: "table_one"});
What's the proper way to close this server? Looking at the source code, I see it has _server and _wss properties, which I assume both have .close() methods. There may also be a top level .close() method on the returned host variable but I couldn't find in the docs where the various methods might be described. If anyone has any guidance for how to close out a server, that would be great.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Following the example of the Node backend here:
What's the proper way to close this server? Looking at the source code, I see it has
_server
and_wss
properties, which I assume both have.close()
methods. There may also be a top level.close()
method on the returnedhost
variable but I couldn't find in the docs where the various methods might be described. If anyone has any guidance for how to close out a server, that would be great.Beta Was this translation helpful? Give feedback.
All reactions