24 lines
925 B
TypeScript
24 lines
925 B
TypeScript
|
import { Qenv } from '@push.rocks/qenv';
|
||
|
const testQenv = new Qenv('./', './.nogit/');
|
||
|
|
||
|
import * as cloudly from '../../ts/index.js';
|
||
|
|
||
|
export const createCloudly = async () => {
|
||
|
const cloudlyConfig: cloudly.ICloudlyConfig = {
|
||
|
cfToken: await testQenv.getEnvVarOnDemand('CF_TOKEN'),
|
||
|
environment: 'integration',
|
||
|
letsEncryptEmail: await testQenv.getEnvVarOnDemand('LETSENCRYPT_EMAIL'),
|
||
|
publicUrl: await testQenv.getEnvVarOnDemand('SERVEZONE_URL'),
|
||
|
publicPort: await testQenv.getEnvVarOnDemand('SERVEZONE_PORT'),
|
||
|
mongoDescriptor: {
|
||
|
mongoDbName: await testQenv.getEnvVarOnDemand('MONGODB_DATABASE'),
|
||
|
mongoDbUser: await testQenv.getEnvVarOnDemand('MONGODB_USER'),
|
||
|
mongoDbPass: await testQenv.getEnvVarOnDemand('MONGODB_PASSWORD'),
|
||
|
mongoDbUrl: await testQenv.getEnvVarOnDemand('MONGODB_URL'),
|
||
|
},
|
||
|
};
|
||
|
const cloudlyInstance = new cloudly.Cloudly();
|
||
|
return cloudlyInstance;
|
||
|
}
|
||
|
|