From 2c5ca94b3c7c5f1c7425fb0d7f7603d857690c30 Mon Sep 17 00:00:00 2001 From: ItzCrazyKns <95534749+ItzCrazyKns@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:19:52 +0530 Subject: [PATCH] feat(app): lint and beautify --- docs/installation/NETWORKING.md | 90 ++++++++++++++++----------------- src/routes/config.ts | 2 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/installation/NETWORKING.md b/docs/installation/NETWORKING.md index 6cb9bfe..ae39e3f 100644 --- a/docs/installation/NETWORKING.md +++ b/docs/installation/NETWORKING.md @@ -10,27 +10,27 @@ This guide will show you how to make Perplexica available over a network. Follow 3. Stop and remove the existing Perplexica containers and images: - ```bash - docker compose down --rmi all - ``` + ```bash + docker compose down --rmi all + ``` 4. Open the `docker-compose.yaml` file in a text editor like Notepad++ 5. Replace `127.0.0.1` with the IP address of the server Perplexica is running on in these two lines: - ```bash - args: - - NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api - - NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001 - ``` + ```bash + args: + - NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api + - NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001 + ``` 6. Save and close the `docker-compose.yaml` file 7. Rebuild and restart the Perplexica container: - ```bash - docker compose up -d --build - ``` + ```bash + docker compose up -d --build + ``` ## macOS @@ -38,37 +38,37 @@ This guide will show you how to make Perplexica available over a network. Follow 2. Navigate to the directory with the `docker-compose.yaml` file: - ```bash - cd /path/to/docker-compose.yaml - ``` + ```bash + cd /path/to/docker-compose.yaml + ``` 3. Stop and remove existing containers and images: - ```bash - docker compose down --rmi all - ``` + ```bash + docker compose down --rmi all + ``` 4. Open `docker-compose.yaml` in a text editor like Sublime Text: - ```bash - nano docker-compose.yaml - ``` + ```bash + nano docker-compose.yaml + ``` 5. Replace `127.0.0.1` with the server IP in these lines: - ```bash - args: - - NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api - - NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001 - ``` + ```bash + args: + - NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api + - NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001 + ``` 6. Save and exit the editor 7. Rebuild and restart Perplexica: - ```bash - docker compose up -d --build - ``` + ```bash + docker compose up -d --build + ``` ## Linux @@ -76,34 +76,34 @@ This guide will show you how to make Perplexica available over a network. Follow 2. Navigate to the `docker-compose.yaml` directory: - ```bash - cd /path/to/docker-compose.yaml - ``` + ```bash + cd /path/to/docker-compose.yaml + ``` 3. Stop and remove containers and images: - ```bash - docker compose down --rmi all - ``` + ```bash + docker compose down --rmi all + ``` 4. Edit `docker-compose.yaml`: - ```bash - nano docker-compose.yaml - ``` + ```bash + nano docker-compose.yaml + ``` 5. Replace `127.0.0.1` with the server IP: - ```bash - args: - - NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api - - NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001 - ``` + ```bash + args: + - NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api + - NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001 + ``` 6. Save and exit the editor 7. Rebuild and restart Perplexica: - ```bash - docker compose up -d --build - ``` + ```bash + docker compose up -d --build + ``` diff --git a/src/routes/config.ts b/src/routes/config.ts index 38192b7..6ff80c6 100644 --- a/src/routes/config.ts +++ b/src/routes/config.ts @@ -54,7 +54,7 @@ router.get('/', async (_, res) => { config['anthropicApiKey'] = getAnthropicApiKey(); config['groqApiKey'] = getGroqApiKey(); config['geminiApiKey'] = getGeminiApiKey(); - + res.status(200).json(config); } catch (err: any) { res.status(500).json({ message: 'An error has occurred.' });