Ad
How To Shut Down `ssh2` Sftp Server Programatically
I am using the ssh2
library to create a sftp server for testing during my testing suite. The server starts successfully and tests run as expected - all is great.
However, after all of the tests have been conducted the testing script does not exit as the sftp server process is still listening/executing.
How can I programatically shut down the sftp server?
Ad
Answer
From the docs:
Server instances also have the same methods/properties/events as
net.Server
.
These look promising:
Ad
source: stackoverflow.com
Related Questions
- → Maximum call stack exceeded when instantiating class inside of a module
- → Browserify api: how to pass advanced option to script
- → Node.js Passing object from server.js to external modules?
- → gulp-rename makes copies, but does not replace
- → requiring RX.js in node.js
- → Remove an ObjectId from an array of objectId
- → Can not connect to Redis
- → React: How to publish page on server using React-starter-kit
- → Express - better pattern for passing data between middleware functions
- → Can't get plotly + node.js to stream data coming through POST requests
- → IsGenerator implementation
- → Async/Await not waiting
- → (Socket.io on nodejs) Updating div with mysql data stops without showing error
Ad