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
2. In the root `.env` file, define the needed OpenAI environment variables in your application.
npm install on the root directory.
* 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.
* Now, visit your OpenAI key page [https://beta.openai.com/account/api-keys](https://beta.openai.com/account/api-keys)
* Create a new key by clicking the "Create new secret key" button.
## Create ENV Variables
3. You can Values should be a string, enclosed with ``""`` Example :
Create an .env file in the root directory of your application.
Duplicate the env-template and rename to .env
In the .env file, define the environment variables you want to use in your application. ex.
```
OPENAI_API_KEY=“sk-xxxxxxx”
OPENAI_API_ORG=“org-xxxxxxxx”
```
`API_KEY="sk-xxxxxxxx"`
`API_ORG="org-xxxxxxx"`
4. In the `.env` file of the client, define the SERVER_URL environment variable in your application.
5. Name the variable starting with **REACT_APP_** and Value must **not** enclosed with commas `""` Example :
## Run server
```
REACT_APP_SERVER_URL=http://localhost:3080/
```
Run server on the root directory
### NPM Install and Run Application
**Note:** Prepare 2 Terminals.
1. On the first terminal, run `npm install` on **root**. After that run `node index.js`
2. On the second terminal, run `npm install` inside the **/client**. Then run `npm run start`
\ No newline at end of file
`node index.js`
### Additional Configuration
After running server, proceed to /client README.md for instructions