Function: upload()
ts
function upload(
localPath,
target,
options?
): Promise<TransferResult>;Connects, uploads and disconnects in one call.
Parameters
| Parameter | Type |
|---|---|
localPath | string |
target | string | RemoteTarget |
options | CopyOptions |
Returns
Promise<TransferResult>
Example
ts
await upload('./dist', 'deploy@example.com:/var/www/app', { recursive: true, privateKey });