This commit is contained in:
2025-01-07 20:30:40 +01:00
parent 9c82f5e5c6
commit 68b0d29b3d
15 changed files with 2884 additions and 48 deletions
+15
View File
@@ -0,0 +1,15 @@
import dotenv from 'dotenv';
import { Client } from '@notionhq/client';
import { NotionToMarkdown } from 'notion-to-md';
dotenv.config();
export const notion = new Client( { auth: process.env.NOTION_API_KEY } )
export const n2m = new NotionToMarkdown({
notionClient: notion,
});
if (process.env.NOTION_DATABASE_ID === undefined) {
console.error('[server] Error: environment variable \'NOTION_DATABASE_ID\' not found')
process.exit();
}
export const databaseId: string = process.env.NOTION_DATABASE_ID;