Skip to content

Commit a893733

Browse files
authored
Update README.md
1 parent ef9c45c commit a893733

File tree

1 file changed

+48
-3
lines changed

1 file changed

+48
-3
lines changed

README.md

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,49 @@
1-
# deploy-ftp
2-
Build and deploy a builded nodejs application (such as React, Angular, Vue ecc...).
31

4-
Pre-release
2+
# Nodejs FTP deploy
3+
4+
Build and deploy a nodejs application (such as React, Angular, Vue ecc...).
5+
6+
7+
## Usage/Examples
8+
9+
Create a **.env.local** file in your project directory with following variables:
10+
11+
| Environment variable | Type | Description |
12+
| :-------------------------------- | :--------- | :--------------------------------------------------------------------------------------------------- |
13+
| `DSDEPLOY_FTP_USER` | `string` | **Required**. FTP username |
14+
| `DSDEPLOY_FTP_HOST` | `string` | **Required**. FTP host |
15+
| `DSDEPLOY_FTP_PASSWORD` | `string` | FTP password (prompted if none given) |
16+
| `DSDEPLOY_FTP_PORT` | `integer` | FTP port (default 21) |
17+
| `DSDEPLOY_FTP_REMOTE_DIR` | `string` | Remote directory name where file will be placed, will use the project directory name if not provided |
18+
| `DSDEPLOY_FTP_LOCAL_DIR` | `string` | Local directory to upload, will look for the dist or build directory if not provided |
19+
| `DSDEPLOY_FTP_DELETE_REMOTE` | `integer` | Set to `0` or `1` to delete remote files before upload (default `0`) |
20+
| `DSDEPLOY_FTP_FORCE_PASSIVE_MODE` | `integer` | Set to `0` or `1` to use passive mode (default `1`) |
21+
| `DSDEPLOY_FTP_USE_SFTP` | `integer` | Set to `0` or `1` to use SFTP (default `0`) |
22+
23+
Use this command to deploy to your FTP server:
24+
25+
```bash
26+
npx @dsabre/deploy-ftp
27+
```
28+
29+
Optionally, you can pass the name of the environment variables file as a command parameter:
30+
31+
```bash
32+
npx @dsabre/deploy-ftp .env
33+
```
34+
35+
or with any name you want:
36+
37+
```bash
38+
npx @dsabre/deploy-ftp myEnvFile.txt
39+
```
40+
41+
42+
## Authors
43+
44+
- [Daniele Sabre](https://github.com/dsabre)
45+
46+
47+
## License
48+
49+
[MIT](https://choosealicense.com/licenses/mit/)

0 commit comments

Comments
 (0)