There are a few possible ways to deal with Redis. Please follow either one of these methods:
- Install Redis. If you are on macOS, I strongly recommend using Homebrew by running:
brew install redis
- Run
redis-server
You should see information about the server, such as the port (for example6379
). Your Redis URL (i.e.DB_REDIS_URL
) will be:redis://localhost:[PORT]
.
Go to the official Upstash or Railway website and follow the instructions to create a Redis server.
You should obtain a URL, which will be your DB_REDIS_URL
.
- Rename the example environment variables located at
app/ui/
,app/widget/
, andserver/
to.env
- Configure properly the environment variables. The ones located inside of the
app
folder can be used by default, but you must change the environment variables inside of theserver/
folder.
DATABASE_URL
is the URL of the PostgreSQL databaseDB_REDIS_URL
should be set to the Redis URL. See the previous section for more detailsOPENAI_API_KEY
is the OpenAI API keyDB_SECRET_KEY
is a random key that you can set to whatever you want
- Run
yarn install
in the main folder and in theserver/
folder - Run
yarn build
in the main folder - Run
mv app/ui/dist server/dist/public && mv app/widget/dist/index.html server/dist/public/bot.html && cp -r app/widget/dist/assets/* server/dist/public/assets/
in the main folder - Run
yarn dev
in the main folder and in theserver/
folder
From there you can open the app by using the URL printed by this last command.