How to use the @clevercloud/client/cjs/api/application.js.updateAllEnvVars function in @clevercloud/client

To help you get started, we’ve selected a few @clevercloud/client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CleverCloud / clever-tools / src / commands / env.js View on Github external
async function importEnv (params) {
  const { alias } = params.options;
  const { org_id, app_id: appId } = await AppConfig.getAppData(alias).toPromise();

  const vars = await variables.readVariablesFromStdin();
  await application.updateAllEnvVars({ id: org_id, appId }, vars).then(sendToApi);

  Logger.println('Environment variables have been set');
};