Skip to content

yankai14/event-management-telegram-bot-backend

Repository files navigation

Event Management Telegram Bot Backend

Backend API for the event management telegram bot project. Build using Django and Postgresql.

Installation

Follow the below instructions:

To install dependencies

Run postgresql service on localhost

sudo service postgresql start

Create your .env file and fill in according to stub.env

Make migrations and migrate databases

python manage.py makemigrations lms
python manage.py migrate

Start server

python manage.py runserver

Run tests

Generate a coverage report

coverage run --omit='*/venv/*' manage.py test

Read coverage report

coverage report

To get a UI coverage report for better analysis,

  1. Install Live Server on VS Code (Optional)
  2. Run the command below in your terminal, the folder htmlcov should be generated
coverage html
  1. Search for the folder index.html and open it on liveshare or on your file explorercoverage run --omit='/venv/' manage.py test

Docker + Docker compose

Install docker and docker-compose using the official docs given.

Remember to start docker service after installing .docker

sudo dockerd

Build docker image

sudo docker-compose build

In your .env file, the variable POSTGRES_HOST should be of this value POSTGRES_HOST = db.

Run the below commands to make migrations and migrate db

python3 manage.py makemigrations lms
sudo docker-compose run web python manage.py migrate

Run docker image

sudo docker-compose up

API Endpoints

Download and install Postman GUI here.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages