corerender/ts/index.ts
2025-01-01 07:33:33 +01:00

23 lines
552 B
TypeScript

import { logger } from './rendertron.logging.js';
import { db } from './rendertron.db.js';
import { Rendertron } from './rendertron.classes.rendertron.js';
export {
Rendertron
}
let rendertronInstance: Rendertron;
export const runCli = async () => {
logger.log('info', `Starting rendertron...`);
rendertronInstance = new Rendertron();
rendertronInstance.start();
logger.log('success', `Successfully started rendertron!`);
};
export const stop = async () => {
if (rendertronInstance) {
rendertronInstance.stop();
}
db.close();
};