JethostNodeApp
5 functions, invoked through the cpanel_uapi tool.
cpanel_uapi(service_id, module="JethostNodeApp", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.configure_app POST#
Set environment variables, mode, or startup file for a Node.js application.
updates config by app_root; supply at least one of env_vars/app_mode/startup_file (none = error); changes apply on next restart. Does NOT change Node version or install dependencies.
control_app POST#
Start, restart, or stop a Node.js application.
changes running state by app_root; restart after a deploy or env change so Passenger reloads. Verify via list_apps app_status.
create_app POST#
Register a new Node.js application.
registers the app and provisions ~/nodevenv/<app_root>/<version>/; does NOT deploy code or install dependencies. Follow with a deploy step. Target domain must exist on and be owned by the account. Creating a second app at the same app_root fails — call list_apps first. For LARGE apps, deploy a PREBUILT app: run npm install and any build step locally or in CI and upload the resulting built/bundled output via deploy_site_from_url or a private git repo + .cpanel.yml — large dependency trees frequently cannot be installed or built on the server (time/resource limits). A bundled production build is self-contained, so node_modules does not need to be uploaded. Do not rely on server-side dependency install (provision_node_dependencies) for large projects.
destroy_app POST#
Unregister (delete) a Node.js application.
permanently unregisters the app at app_root and removes its virtualenv; destructive/irreversible — confirm with the user. Does NOT delete source code under app_root. Separate from control_app so it is independently gateable.
list_apps GET#
List this account's Node.js applications.
returns every registered Node.js app flattened from Selector state, each with app_root (the identifier used by all other functions), domain, app_uri, version, app_status, app_mode, startup_file, env_vars, and virtualenv activate path. Call FIRST to discover apps and check status. An app appears here as soon as created, even before code/deps are deployed.
No parameters.