update
Showing
1 changed file
with
15 additions
and
9 deletions
| ... | @@ -2,22 +2,28 @@ | ... | @@ -2,22 +2,28 @@ |
| 2 | 2 | ||
| 3 | ## Setting up local development | 3 | ## Setting up local development |
| 4 | 4 | ||
| 5 | ### Create ENV Variables | 5 | ### Set up ENV Variables |
| 6 | 1. Set-up environment variable `.env` file in root and inside */client* folder. In root, duplicate the `env-template` file and rename it to `.env`. Inside the */client* folder, create `.env` file | 6 | 1. Set up environment variable `.env` file in root and inside */client* folder. In root, duplicate the `env-template` file and rename it to `.env`. Inside the */client* folder, create `.env` file |
| 7 | 2. In the root `.env` file, define the needed OpenAI environment variables in your application. | 7 | 2. In the root `.env` file, define the needed OpenAI environment variables in your application. |
| 8 | 1. Sign up here [https://beta.openai.com/signup](https://beta.openai.com/signup). You can use your Google or Microsoft account to sign up if you don't want to create using an email/password combination. You may need a valid mobile number to verify your account. | 8 | |
| 9 | 2. Now, visit your OpenAI key page [https://beta.openai.com/account/api-keys](https://beta.openai.com/account/api-keys) | 9 | * Sign up here [https://beta.openai.com/signup](https://beta.openai.com/signup). You can use your Google or Microsoft account to sign up if you don't want to create using an email/password combination. You may need a valid mobile number to verify your account. |
| 10 | 3. Create a new key by clicking the "Create new secret key" button. | 10 | * Now, visit your OpenAI key page [https://beta.openai.com/account/api-keys](https://beta.openai.com/account/api-keys) |
| 11 | 3. You can Values should be a string, enclosed with ``""`` Example : | 11 | * Create a new key by clicking the "Create new secret key" button. |
| 12 | |||
| 13 | 3. You can Values should be a string, enclosed with ``""`` Example : | ||
| 14 | |||
| 12 | ``` | 15 | ``` |
| 13 | OPENAI_API_KEY=“sk-xxxxxxx” | 16 | OPENAI_API_KEY=“sk-xxxxxxx” |
| 14 | OPENAI_API_ORG=“org-xxxxxxxx” | 17 | OPENAI_API_ORG=“org-xxxxxxxx” |
| 15 | ``` | 18 | ``` |
| 19 | |||
| 16 | 4. In the `.env` file of the client, define the SERVER_URL environment variable in your application. | 20 | 4. In the `.env` file of the client, define the SERVER_URL environment variable in your application. |
| 17 | 5. Name the variable starting with **REACT_APP_** and Value must **not** enclosed with commas `""` Example : | 21 | 5. Name the variable starting with **REACT_APP_** and Value must **not** enclosed with commas `""` Example : |
| 22 | |||
| 18 | ``` | 23 | ``` |
| 19 | REACT_APP_SERVER_URL=http://localhost:3080/ | 24 | REACT_APP_SERVER_URL=http://localhost:3080/ |
| 20 | ``` | 25 | ``` |
| 26 | |||
| 21 | ### NPM Install and Run Application | 27 | ### NPM Install and Run Application |
| 22 | **Note:** Prepare 2 Terminals. | 28 | **Note:** Prepare 2 Terminals. |
| 23 | 1. On the first terminal, run `npm install` on **root**. After that run `node index.js` | 29 | 1. On the first terminal, run `npm install` on **root**. After that run `node index.js` | ... | ... |
-
Please register or sign in to post a comment