Skip to content

Commit 4bcd9b2

Browse files
author
followDev
committed
README update with env setup
1 parent 95f8ff5 commit 4bcd9b2

File tree

5 files changed

+28
-11
lines changed

5 files changed

+28
-11
lines changed

README.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ Make sure you have installed all of the following prerequisites on your developm
88
* Git - [Download & Install Git](https://git-scm.com/downloads). OSX and Linux machines typically have this already installed.
99
* Node.js - [Download & Install Node.js](https://nodejs.org/en/download/) and the npm package manager. If you encounter any problems, you can also use this [GitHub Gist](https://gist.github.com/isaacs/579814) to install Node.js.
1010

11-
## Environment variables setup example
12-
```
13-
OPENAI_API_KEY = YOU_API_KEY_HERE
14-
MONGO_URI = mongodb://0.0.0.0:27017/chatGPT
15-
```
16-
17-
1811
## Cloning The GitHub Repository
1912
The recommended way to get ChatGPT clone is to use git to directly clone the repository:
2013

2114
```bash
2215
$ git clone https://github.com/nisabmohd/ChatGPT.git
2316
```
17+
## Environment variables Node setup
18+
```
19+
VITE_API_URL=http://localhost:8000
20+
```
21+
22+
## Environment variables Node setup
23+
```
24+
OPENAI_API_KEY = YOU_API_KEY_HERE
25+
MONGO_URI = mongodb://0.0.0.0:27017/chatGPT
26+
```
2427

2528
## Running Your Application
2629

client/package-lock.json

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@types/react": "^18.0.26",
2020
"@types/react-dom": "^18.0.9",
2121
"@vitejs/plugin-react": "^3.0.0",
22+
"react-error-overlay": "^6.0.9",
2223
"typescript": "^4.9.3",
2324
"vite": "^4.0.0"
2425
}

client/src/url.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const url = "https://chat-gpt-ldgi.vercel.app";
1+
export const url: string = import.meta.env.VITE_API_URL as string;

client/vite.config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { defineConfig } from 'vite'
2-
import react from '@vitejs/plugin-react'
1+
import { defineConfig } from "vite";
2+
import react from "@vitejs/plugin-react";
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7-
})
7+
});

0 commit comments

Comments
 (0)