koobor-sdk
Version:
Koobor Gaming Platform SDK
37 lines • 1.66 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = void 0;
var dotenv = __importStar(require("dotenv"));
// First, load common .env file
dotenv.config();
console.log("load .env");
// Then, load env-specific .env.$NODE_ENV file
if (process.env.NODE_ENV) {
dotenv.config({ path: __dirname + "/../../.env." + process.env.NODE_ENV });
console.log("load .env.$ENV:" + __dirname + "/../../.env." + process.env.NODE_ENV);
}
// Finally, load distributed and committed .env.dist file
dotenv.config({ path: __dirname + "/../../.env.dist" });
console.log("load .env.dist:" + __dirname + "/../../.env.dist");
// Use 'config' const instead of process.env to be sure that dotenv has been initialized
exports.config = process.env;
//# sourceMappingURL=config.js.map