|
|
|
@ -4,17 +4,17 @@ const path = require("path") |
|
|
|
const tmpdir = path.join(require("os").tmpdir(), ".budibase") |
|
|
|
|
|
|
|
// normal development system
|
|
|
|
const WORKER_PORT = "10002" |
|
|
|
const MAIN_PORT = cypressConfig.env.PORT |
|
|
|
const SERVER_PORT = cypressConfig.env.PORT |
|
|
|
const WORKER_PORT = cypressConfig.env.WORKER_PORT |
|
|
|
|
|
|
|
process.env.BUDIBASE_API_KEY = "6BE826CB-6B30-4AEC-8777-2E90464633DE" |
|
|
|
process.env.NODE_ENV = "cypress" |
|
|
|
process.env.ENABLE_ANALYTICS = "false" |
|
|
|
process.env.PORT = MAIN_PORT |
|
|
|
process.env.JWT_SECRET = cypressConfig.env.JWT_SECRET |
|
|
|
process.env.COUCH_URL = `leveldb://${tmpdir}/.data/` |
|
|
|
process.env.SELF_HOSTED = 1 |
|
|
|
process.env.WORKER_URL = "http://localhost:10002/" |
|
|
|
process.env.APPS_URL = `http://localhost:${MAIN_PORT}/` |
|
|
|
process.env.WORKER_URL = `http://localhost:${WORKER_PORT}/` |
|
|
|
process.env.APPS_URL = `http://localhost:${SERVER_PORT}/` |
|
|
|
process.env.MINIO_URL = `http://localhost:4004` |
|
|
|
process.env.MINIO_ACCESS_KEY = "budibase" |
|
|
|
process.env.MINIO_SECRET_KEY = "budibase" |
|
|
|
@ -33,11 +33,14 @@ exports.run = ( |
|
|
|
// require("dotenv").config({ path: resolve(dir, ".env") })
|
|
|
|
// don't make this a variable or top level require
|
|
|
|
// it will cause environment module to be loaded prematurely
|
|
|
|
require(serverLoc) |
|
|
|
|
|
|
|
// override the port with the worker port temporarily
|
|
|
|
process.env.PORT = WORKER_PORT |
|
|
|
require(workerLoc) |
|
|
|
// reload main port for rest of system
|
|
|
|
process.env.PORT = MAIN_PORT |
|
|
|
|
|
|
|
// override the port with the server port
|
|
|
|
process.env.PORT = SERVER_PORT |
|
|
|
require(serverLoc) |
|
|
|
} |
|
|
|
|
|
|
|
if (require.main === module) { |
|
|
|
|