Skip to content

Student-Labs-2023/network-class-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Class Backend

Supported python versions

Network Class Backend is a backend part of the Student-Labs-2023 project called Network Classroom, written based on the FastAPI web framework in Python 3.11.4.

Preliminary actions before launch

In order to run the project, you need to run PostgreSQL locally:

  1. Download and install PostgreSQL versions 14.9
  2. When installing, you specify the password and port, remember them
  3. Next, you need to run pgAdmin 4 and connect to the server that you will have in the list
  4. Next, you need to download backup.sql, according to the following link.
  5. Next, you need to expand the tab Databases and right-click on the postgres database
  6. Next, select Restore and in the window that opens, next to the inscription Filename choose backup.sql
  7. Press the button Restore
  8. Make sure that you have added the necessary tables for testing
  9. You can start launching the project!

How to launch

  1. Install the required Python version, namely Python 3.11.4
  2. Clone Repository
git clone -b develop-after-rebase https://github.com/Student-Labs-2023/network-class-backend
  1. Go to the root folder of the project
cd network-class-backend
  1. Install the necessary dependencies
pip install -r requirements.txt
  1. Create a .env file in the root of the project and put the following information there:
DB_HOST=localhost
DB_PORT=5432 <- Here you specify the port that you specified during installation PostgreSQL
DB_NAME=postgres
DB_USER=postgres
DB_PASS=postgres <- Here, instead of postgres, you specify the password that you specified during installation PostgreSQL
  1. To start the project, use the following command
gunicorn src.main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind=0.0.0.0:8000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages