30 lines
888 B
TypeScript
30 lines
888 B
TypeScript
import * as early from '@push.rocks/early';
|
|
early.start('cloudly');
|
|
import * as plugins from './plugins.js';
|
|
import * as paths from './paths.js';
|
|
import { Cloudly } from './classes.cloudly.js';
|
|
import { logger } from './logger.js';
|
|
const cloudlyQenv = new plugins.qenv.Qenv(paths.packageDir, paths.nogitDir, true);
|
|
early.stop();
|
|
|
|
/**
|
|
* starts the cloudly instance
|
|
*/
|
|
const runCli = async () => {
|
|
logger.log('info', process.env.SERVEZONE_ENVIRONMENT);
|
|
const cloudlyInstance = new Cloudly();
|
|
|
|
logger.log(
|
|
'info',
|
|
`running in environment ${await cloudlyQenv.getEnvVarOnDemand('SERVEZONE_ENVIRONMENT')}`,
|
|
);
|
|
|
|
await cloudlyInstance.start();
|
|
const demoMod = await import('./00demo/index.js');
|
|
demoMod.installDemoData(cloudlyInstance);
|
|
};
|
|
|
|
export { runCli, Cloudly };
|
|
type ICloudlyConfig = plugins.servezoneInterfaces.data.ICloudlyConfig;
|
|
export { type ICloudlyConfig };
|