2023-04-05 12:46:25 +00:00
|
|
|
import Floriday from './floriday.js';
|
2023-04-03 19:02:00 +00:00
|
|
|
|
|
|
|
async function main() {
|
2023-04-05 12:46:25 +00:00
|
|
|
const floriday = new Floriday();
|
|
|
|
await floriday.start();
|
|
|
|
|
2023-04-06 08:56:52 +00:00
|
|
|
process.on('SIGINT', async () => {
|
|
|
|
await floriday.stop();
|
2023-04-05 12:46:25 +00:00
|
|
|
process.exit();
|
|
|
|
});
|
|
|
|
|
2023-04-06 08:56:52 +00:00
|
|
|
try {
|
|
|
|
await floriday.schedule()
|
|
|
|
} catch (err) {
|
|
|
|
await floriday.tryConn();
|
|
|
|
}
|
2023-04-03 19:02:00 +00:00
|
|
|
}
|
2023-04-05 12:46:25 +00:00
|
|
|
main();
|