1.1.2 • Published 2 years ago

@dsabre/deploy-ftp v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Nodejs FTP deploy

Version License: MIT Downloads GitHub issues Dependencies

Build and deploy a nodejs application (such as React, Angular, Vue ecc...).

From version 1.1.2, using DSDEPLOY_FTP_PREDEPLOY variable, you can deploy anything, even not a site.

Configuration

Create a .env.local file in your project directory with following variables:

Environment variableTypeDescription
DSDEPLOY_FTP_USERstringRequired. FTP username
DSDEPLOY_FTP_HOSTstringRequired. FTP host
DSDEPLOY_FTP_PASSWORDstringFTP password (prompted if none given)
DSDEPLOY_FTP_PORTintegerFTP port (default 21)
DSDEPLOY_FTP_REMOTE_DIRstringRemote directory name where file will be placed, will use the project directory name if not provided
DSDEPLOY_FTP_LOCAL_DIRstringLocal directory to upload, will look for the dist or build directory if not provided
DSDEPLOY_FTP_DELETE_REMOTEintegerSet to 0 or 1 to delete remote files before upload (default 0)
DSDEPLOY_FTP_FORCE_PASSIVE_MODEintegerSet to 0 or 1 to use passive mode (default 1)
DSDEPLOY_FTP_USE_SFTPintegerSet to 0 or 1 to use SFTP (default 0)
DSDEPLOY_FTP_PREDEPLOYstringExecute commands before deploy, you can define multiple commands to execute by separating them with a semicolon. If you don't want to execute any commands, set the variable to none (default: npm run build).

Example of a .env.local with default/example values

DSDEPLOY_FTP_USER=yourftpusername
DSDEPLOY_FTP_HOST=host.example.xyz
DSDEPLOY_FTP_PASSWORD=yourpassword
DSDEPLOY_FTP_PORT=21
DSDEPLOY_FTP_REMOTE_DIR=remote-directory
DSDEPLOY_FTP_LOCAL_DIR=dist
DSDEPLOY_FTP_DELETE_REMOTE=0
DSDEPLOY_FTP_FORCE_PASSIVE_MODE=1
DSDEPLOY_FTP_USE_SFTP=0
DSDEPLOY_FTP_PREDEPLOY="npm run build"

Usage

Use this command to deploy to your FTP server:

npx @dsabre/deploy-ftp

Optionally, you can pass the name of the environment variables file as a command parameter:

npx @dsabre/deploy-ftp .env

or with any name you want:

npx @dsabre/deploy-ftp myEnvFile.txt

Contributing

For contributions, issues and feature requests please check issues page.

Authors

Support me

License

MIT

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-alpha.14

2 years ago

1.0.0-alpha.13

2 years ago

1.0.0-alpha.12

2 years ago

1.0.0-alpha.11

2 years ago

1.0.0-alpha.10

2 years ago

1.0.0-alpha.9

2 years ago

1.0.0-alpha.8

2 years ago

1.0.0-alpha.7

2 years ago

1.0.0-alpha.6

2 years ago

1.0.0-alpha.5

2 years ago

1.0.0-alpha.4

2 years ago

1.0.0-alpha.3

2 years ago

1.0.0-alpha.2

2 years ago