Skip to content

Commit

Permalink
chore: add prod URL if .env is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
ydennisy committed Nov 19, 2023
1 parent e7b28d5 commit d473a29
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cli/src/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> => {
try {
Expand Down
3 changes: 2 additions & 1 deletion cli/src/chat.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion cli/src/search.ts
Original file line number Diff line number Diff line change
@@ -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<void> => {
try {
Expand Down

0 comments on commit d473a29

Please sign in to comment.