2023-04-05 16:33:56 +02:00
|
|
|
#!/usr/bin/env node
|
|
|
|
const path = require("path")
|
|
|
|
const fs = require("fs")
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
const envFilePath = path.join(process.cwd(), ".env")
|
|
|
|
if (!fs.existsSync(envFilePath)) {
|
|
|
|
const envFileJson = {
|
|
|
|
BUDIBASE_URL: "http://localhost:10000",
|
|
|
|
ACCOUNT_PORTAL_URL: "http://localhost:10001",
|
2023-04-25 21:36:27 +02:00
|
|
|
ACCOUNT_PORTAL_API_KEY: "budibase",
|
2023-04-05 16:33:56 +02:00
|
|
|
BB_ADMIN_USER_EMAIL: "admin",
|
|
|
|
BB_ADMIN_USER_PASSWORD: "admin",
|
2023-04-25 21:36:27 +02:00
|
|
|
LOG_LEVEL: "info",
|
2023-07-18 22:13:17 +02:00
|
|
|
JEST_TIMEOUT: "60000",
|
2023-07-19 16:42:12 +02:00
|
|
|
DISABLE_PINO_LOGGER: "1",
|
2023-04-05 16:33:56 +02:00
|
|
|
}
|
|
|
|
let envFile = ""
|
|
|
|
Object.keys(envFileJson).forEach(key => {
|
|
|
|
envFile += `${key}=${envFileJson[key]}\n`
|
|
|
|
})
|
|
|
|
fs.writeFileSync(envFilePath, envFile)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
init()
|