Upload Backend¶
Uploads PHP files from the php_backend/ directory to a remote server via SFTP. Reads the connection configuration from .vscode/sftp.json and deploys all .php files into {remotePath}/php_backend on the target server.
Usage¶
Prerequisites¶
- An SFTP server configured in
.vscode/sftp.json - PHP files present in the
php_backend/directory
Behavior¶
- Reads
.vscode/sftp.jsonfor host, port, username, and password - Scans
php_backend/for all*.phpfiles - Connects to the remote server via SFTP
- Creates the
php_backendsubdirectory under the configuredremotePath - Uploads each PHP file into that directory
- Prints a confirmation per uploaded file
If no PHP files are found, the script exits with a notice.
Source¶
See scripts/upload-backend.mjs.