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-serverYou 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
appfolder can be used by default, but you must change the environment variables inside of theserver/folder.
DATABASE_URLis the URL of the PostgreSQL databaseDB_REDIS_URLshould be set to the Redis URL. See the previous section for more detailsOPENAI_API_KEYis the OpenAI API keyDB_SECRET_KEYis a random key that you can set to whatever you want
- Run
yarn installin the main folder and in theserver/folder - Run
yarn buildin 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 devin the main folder and in theserver/folder
From there you can open the app by using the URL printed by this last command.