mirror of
https://github.com/arthur-pbty/gestion-perso.git
synced 2026-06-03 23:36:35 +02:00
16 lines
382 B
TypeScript
16 lines
382 B
TypeScript
require('dotenv').config()
|
|
const run = require("./fonctions/run");
|
|
const initDB = require("./fonctions/initDB");
|
|
|
|
initDB();
|
|
|
|
const runAsync = async () => {
|
|
if (process.env.TOKENS) {
|
|
const tokens = process.env.TOKENS.split(',');
|
|
Promise.all(tokens.map(token => run(token)));
|
|
} else {
|
|
console.error("Environment variable 'TOKENS' is not defined.");
|
|
}
|
|
};
|
|
|
|
runAsync(); |