Create NodeJS build from archive
Upload a project archive, auto-detect build settings, and immediately start a Node.js build.
This is the recommended single-step approach for deploying a Node.js application. The archive is uploaded to the website's file storage, build settings are auto-detected from the package.json inside the archive, and the build process starts automatically. Optional override fields take precedence over auto-detected values. Maximum archive size is 50MB.
Before archiving, exclude node_modules/ and any build output directories (e.g. dist/, .next/, build/) — they are not needed because the build process runs the install step automatically, and including them unnecessarily increases the archive size. This also helps keep the archive well under the 50MB limit.
Example (zip):
zip -r archive.zip . --exclude "node_modules/*" --exclude "dist/*"
The returned build uuid can be used to poll progress and retrieve logs via the Get Node.js Build Logs endpoint.
Path parameters
Domain name
Request body
Example request
{
"node_version": 20,
"app_type": "vite",
"root_directory": "webapp",
"output_directory": "dist",
"build_script": "build",
"entry_file": "server.js",
"package_manager": "npm"
}Response
Success response
Example response
{
"uuid": "69f07fe2-197a-4fb3-9dae-606f965ad13d",
"state": "pending",
"options": {
"node_version": 24,
"app_type": "vite",
"root_directory": "src",
"output_directory": "dist",
"build_script": "build",
"entry_file": "server.js",
"package_manager": "npm",
"source_type": "archive",
"source_options": {
"archive_path": "archive.zip"
}
},
"created_at": "2024-05-29T05:49:49.067239Z",
"updated_at": "2024-05-29T05:49:49.067239Z"
}