Skip to main content

Deploy a directory

The SDK zips a directory and uploads it, like pxxl deploy. It leaves out .git, node_modules, .env files, logs, and build folders such as dist and build. Files that look like private keys or credentials stop the deploy with an error in Node.js and Go; Python and Rust leave them out. The archive can hold up to 12,000 files and 220 MiB of source. In Node.js, settings in pxxl.toml are read from the directory first, and the values you pass override them. Node.js also applies your .pxxlignore file.
path
default:"current directory"
Directory to package. Go calls it Directory; Python and Rust call it directory.
path
Upload an existing zip file instead of packaging a directory. Go: ArchivePath; Python and Rust: archive_path.
string
Project name. Required when you create a new project.
string
Pxxl domain suffix for a new project, such as pxxl.pro. Required when you create a new project.
string
Deploy to an existing project instead of creating one.
string
default:"production"
Deployment environment.
number
Port your web service listens on.
string
Project root inside a monorepo.
string
Overrides dependency installation.
string
Overrides the detected build command.
string
Overrides the detected start command.
You can also pass language, framework, packageManager, entryFile, and commitMessage. The Rust DeployInput has no port, base_directory, or entry_file fields.
Returns
Go returns a *pxxl.DeployResult with Success, Message, ProjectID, DeploymentID, URL, DeploymentURL, and the full body in Raw.

Project operations

purgeCache() uses id to make a retry safe. The SDK generates one if you leave it out.

Deployment operations

deployments.logs(id) returns build logs unless you pass build: false.

Other languages

Go, Python, and Rust have the read calls and deploy. Project control (status, restart, rollback, settings) is in Node.js only. Use the raw request method for it in other languages. In Go, Python, and Rust, set build to true for build logs. Python defaults it to False, so you get runtime logs.