fix(core): update
This commit is contained in:
28
ts/index.ts
Normal file
28
ts/index.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import * as early from '@push.rocks/early';
|
||||
early.start('cloudly');
|
||||
import * as plugins from './cloudly.plugins.js';
|
||||
import * as paths from './cloudly.paths.js';
|
||||
import { Cloudly } from './cloudly.classes.cloudly.js';
|
||||
import { logger } from './cloudly.logging.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('./demo/index.js');
|
||||
demoMod.installDemoData(cloudlyInstance);
|
||||
};
|
||||
|
||||
export { runCli, Cloudly };
|
Reference in New Issue
Block a user