We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d20fc67 commit d58e9c7Copy full SHA for d58e9c7
.gitignore
@@ -38,3 +38,4 @@ next-env.d.ts
38
39
# misc
40
.vscode
41
+*.jsonl
scripts/download.ts
@@ -0,0 +1,25 @@
1
+import prisma from "@/lib/prisma";
2
+import "dotenv-flow/config";
3
+import * as fs from "fs";
4
+
5
+async function main() {
6
+ const projects = await prisma.project.findMany({
7
+ select: {
8
+ id: true,
9
+ name: true,
10
+ description: true,
11
+ slug: true,
12
+ },
13
+ orderBy: {
14
+ createdAt: "asc",
15
16
+ });
17
18
+ // save as JSONL
19
+ const file = fs.createWriteStream("projects.jsonl");
20
+ projects.forEach((project) => {
21
+ file.write(JSON.stringify(project) + "\n");
22
23
+}
24
25
+main();
0 commit comments