Skip to content

Run the API examples ​

Run these from an installed source checkout after npm run build. They use temporary local fixtures, never saved application settings or an external server.

TaskCommandWhat it checks
File operations over FTPnode examples/test-api.mjs ftpUpload, stat, exact-byte download, rename, delete, directory, streams and listing
The same operations over SFTPnode examples/test-api.mjs sftpThe same public methods with a generated host-key pin
SSH executionnode examples/test-ssh.mjsAuthentication, stdout, stderr and exit status
Encrypted key conversionnode examples/test-keys.mjsPPK/OpenSSH identity preservation and wrong-passphrase refusal

The FTP and SFTP API examples print the quick-start transcript. The SSH and key examples have captured output and fixture boundaries. The SSH fixture recognizes controlled commands; it does not implement a full operating system or sudo.

For executable transfer commands rather than JavaScript calls, use the CLI local-server walkthrough.