Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.63 KB

File metadata and controls

44 lines (31 loc) · 1.63 KB

hostinger hosting nodejs replace-environment-variables

Replace Node.js environment variables

Synopsis

Replaces the website's Node.js environment variables with the ones provided. This is a full replace: any variable not in the request is deleted, and sending an empty env_vars array deletes every variable. Saving writes the values and restarts the running Node.js process.

A restart is enough for apps that read environment variables at process start, such as Express or NestJS. It is not enough for frameworks that bake variables into the build. Next.js standalone is one of those: build-time values (including NEXT_PUBLIC_*) need a fresh build. After this call, use the Start Node.js build endpoint so those apps pick up the new values.

The List Node.js environment variables endpoint returns masked values (********), so never copy values from it into this request. Always send the full desired set with real values taken from the project .env file or the user prompt.

hostinger hosting nodejs replace-environment-variables <username> <domain> [flags]

Options

      --env-vars string   Environment variables to set. This is the full desired set: any variable not in
                          this list is deleted, and an empty array deletes every variable. (JSON)
  -h, --help              help for replace-environment-variables

Options inherited from parent commands

      --config string   Config file (default is $HOME/.hostinger.yaml)
      --format string   Output format type (json|table|tree), default: table

SEE ALSO