Skip to content

Function: upload() ​

ts
function upload(
   localPath, 
   target, 
   options?
): Promise<TransferResult>;

Connects, uploads and disconnects in one call.

Parameters ​

ParameterType
localPathstring
targetstring | RemoteTarget
optionsCopyOptions

Returns ​

Promise<TransferResult>

Example ​

ts
await upload('./dist', 'deploy@example.com:/var/www/app', { recursive: true, privateKey });

Released under the MIT License.