v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-03269339953.6 KB
Hosting: NodeJS

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.

post/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/from-archive

Path parameters

usernamestring required
Example:u123456789
domainstring required
Example:mydomain.tld

Domain name

Request body

archivestring required

Project archive file (.zip, .tar.gz, or .tgz), maximum 50MB

node_version18 | 20 | 22 | 24 nullable

Node.js version override (auto-detected from package.json if omitted)

app_type'create-react-app' | 'vite' | 'angular' | 'react' | 'vue' | 'parcel' | 'express' | 'fastify' | 'nest' nullable

Node.js application type override

root_directorystring nullable

Application root directory override (where package.json is located) relative to public_html

output_directorystring nullable

Build output directory override relative to the root directory

build_scriptstring nullable

Build script override

entry_filestring nullable

Main entry point file override

package_manager'npm' | 'yarn' | 'pnpm' nullable

Package manager override

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

uuidstring

Build UUID

state'pending' | 'running' | 'completed' | 'failed'

Build state

created_atstring date-time

Creation timestamp

updated_atstring date-time

Last update timestamp

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"
}