This simple repo shows how to easily add chat functionality into an Express project with Chat Engine.
To understand the code, please watch this video!
Make your FastAPI server support chat - in 3 steps:
Go to Chat Engine to setup your own chat server.
- Click "New Project" and follow the steps
- Your
Project IDandPrivate Keywill be required for step 2
Replace the following variables with your own Project ID and Private Key.
(Perferrably as environment variables.)
CHAT_ENGINE_PROJECT_ID=5d498a31-cd23-42b7-b367-4fcc9463bd2f
CHAT_ENGINE_PRIVATE_KEY=49a46286-91c3-4f9c-92bf-284ae51b7628
Run the following two lines of code in server-express/.
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 3001
Done! Your Express server is on localhost:3001 and connected to Chat Engine!
All new /signup users are on Chat Engine, and their credentiuals are found upon /login.
To understand the code, please watch this video!