coretraffic/ts/index.ts

23 lines
720 B
TypeScript
Raw Permalink Normal View History

2024-05-15 08:10:41 +00:00
console.log('**** Starting coretraffic ****');
import * as plugins from './coretraffic.plugins.js';
import * as paths from './coretraffic.paths.js';
import { logger } from './coretraffic.logging.js';
import { CoreTraffic } from './coretraffic.classes.coretraffic.js';
export { CoreTraffic };
const projectinfo = new plugins.projectinfo.ProjectInfo(paths.packageDir);
let coretrafficInstance: CoreTraffic;
export const runCli = async () => {
logger.log('info', `coretraffic@v${projectinfo.npm.version}`);
coretrafficInstance = new CoreTraffic();
await coretrafficInstance.start();
logger.log('info', 'coretraffic successfully started!');
};
export const stop = async () => {
coretrafficInstance.stop();
};