Chitchaty can answer almost any questions you have in mind. It is running Chat GPT in the background.
-
If you don’t have Node.js installed, install it from here (Node.js version >= 14.6.0 required)
-
Clone this repository
-
Navigate into the project directory
cd chichaty
-
Install the requirements
npm install
-
Make a copy of the example environment variables file
On Linux systems:
cp .env.example .env
On Windows:
copy .env.example .env
-
Add your API key to the newly created
.env
fileOPENAI_API_KEY=[ADD API KEY]
-
Add your local MongoDB URI
.env
fileMONGO_LOCAL_URI=[ADD LOCAL MONGO DB INSTANCE HERE]
-
Add your production MongoDB URI
.env
file.MONGO_PROD_URI=[ADD PRODUCTION MONGO DB INSTANCE HERE]
-
You may change the default env settings. Change the
NODE_ENV
if you want to simulate different node environment during the development of your app.NODE_ENV=development PORT=5090
-
Run the app
npm run dev
You should now be able to access the app at http://localhost:5090! You may also check the live demo version of chitchaty: https://chitchaty.herokuapp.com.
NOTE: The project provides also the necessary setup for your heroku deployment.
- Install the Heroku CLI
- Download and install the Heroku CLI.
- If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.
heroku login
- Create a new Git repository. Initialize a git repository in a new or existing directory
cd my-project/
git init
heroku git:remote -a [APP_NAME]
- Deploy your application. Commit your code to the repository and deploy it to Heroku using Git.
git add .
git commit -am "make it better"
git push heroku master
- For existing repositories, simply add the heroku remote
heroku git:remote -a [APP_NAME]
- Add the following environment variables to the heroku dashboard.Got to your app(chitchatty) > settings > Config Vars.
MONGO_PROD_URI
OPENAI_API_KEY