Environment setup
Follow instructions below to setup your development environment.
Cloning
Clone the project from Github in your terminal:
Installing dependencies
The project is in a monorepo structure and the code for the backend is in ./server
folder and the code for the frontend is in ./client
folder
To install server dependencies from the root folder run commands:
After signing up at Neon and creating your database you will receive a connection string, set them in your .env
file from this format:
postgres://<PGUSER>:<PGPASSWORD>@<PGHOST>/<PGDATABASE>
To install client dependencies from the root folder run commands:
Database
After setting environment variables for your server now you can create and populate your database with it's tables, categories and questions. some sample categories with around 50 questions are located at ./server/db/categories
in json format and ready scripts to create the database.
You can download complete data from here and put them in the categories folder
Go to server folder and run these commands:
Bot
Create a Telegram bot if you haven't already and if not you can follow these instructions from the official Telegram website: https://core.telegram.org/bots/tutorial
Once you have the bot token put it in the server's .env file
Last updated