coretraffic/ts/index.ts
2024-05-15 10:10:41 +02:00

23 lines
720 B
TypeScript

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();
};