diff --git a/cli/src/add.ts b/cli/src/add.ts index 93c2a0e..37d6332 100644 --- a/cli/src/add.ts +++ b/cli/src/add.ts @@ -7,7 +7,8 @@ interface Node { type: 'NOTE' | 'WEB_PAGE'; } -const BASE_URL = process.env.BASE_URL; +const BASE_URL = + process.env.BASE_URL || 'https://kg1-backend-j5dxapaafq-ew.a.run.app'; const add = async (raw: string): Promise => { try { diff --git a/cli/src/chat.ts b/cli/src/chat.ts index 986341c..24c69fb 100644 --- a/cli/src/chat.ts +++ b/cli/src/chat.ts @@ -1,7 +1,8 @@ import axios from 'axios'; import chalk from 'chalk'; -const BASE_URL = process.env.BASE_URL; +const BASE_URL = + process.env.BASE_URL || 'https://kg1-backend-j5dxapaafq-ew.a.run.app'; const chat = async (query: string) => { try { diff --git a/cli/src/search.ts b/cli/src/search.ts index cafcc53..83d69e6 100644 --- a/cli/src/search.ts +++ b/cli/src/search.ts @@ -1,7 +1,8 @@ import axios from 'axios'; import chalk from 'chalk'; -const BASE_URL = process.env.BASE_URL; +const BASE_URL = + process.env.BASE_URL || 'https://kg1-backend-j5dxapaafq-ew.a.run.app'; const search = async (q: string): Promise => { try {