1
0
mirror of synced 2026-01-01 00:02:54 -05:00
Files
airbyte/airbyte-webapp/scripts/environment.js
Tim Roes 8969824b41 🪟 🔧 Add a start:cloud command to the webapp (#19026)
* Add a start:cloud command to the webapp

* Update airbyte-webapp/scripts/environment.js

Co-authored-by: Joey Marshment-Howell <josephkmh@users.noreply.github.com>

Co-authored-by: Joey Marshment-Howell <josephkmh@users.noreply.github.com>
2022-11-07 14:52:49 +01:00

26 lines
669 B
JavaScript

const fs = require("fs");
const path = require("path");
const dotenv = require("dotenv");
if (!process.env.AB_ENV) {
return;
}
const envFile = path.resolve(
__dirname,
"../../../airbyte-cloud/cloud-webapp/development",
`.env.${process.env.AB_ENV}`
);
if (!fs.existsSync(envFile)) {
console.error(
`~~~ This mode is for Airbyte employees only. ~~~\n` +
`Could not find .env file for environment ${process.env.AB_ENV} (looking at ${envFile}).\n` +
`Make sure you have the latest airbyte-cloud repository checked out in a directory directly next to the airbyte OSS repository.\n`
);
process.exit(42);
}
dotenv.config({ path: envFile });