23 lines
552 B
TypeScript
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();
|
||
|
};
|