-
I have a script // getRaids uses $env/static/private
import { getRaids } from '../api';
import { db } from './index';
import { bossTable } from './schema/boss.schema';
import { raidTable } from './schema/raid.schema';
const main = async () => {
const raids = await getRaids();
for (const raid of raids) {
await db
.insert(raidTable)
.values([{ name: raid.map }])
.execute();
for (const boss of raid.bosses) {
await db.insert(bossTable).values({ entry: boss.entry, name: boss.name }).execute();
}
}
};
main(); I run this script with like this
Is there any way around this? I just want to run simple CLI script |
Beta Was this translation helpful? Give feedback.
Answered by
danielres
Oct 20, 2023
Replies: 2 comments 6 replies
-
You probably need to use |
Beta Was this translation helpful? Give feedback.
1 reply
-
I've used |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
mrceperka
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've used
vite-node
successfully in the past.https://github.com/vitest-dev/vitest/tree/main/packages/vite-node#readme