This project uses: Python, FastAPI and SQLAlchemy
First you should create env folder using commands:
mkdir project
cd project
python -m venv env
cd env
cd Scripts
activate.batTo install the application use following commands:
cd..
cd..
python -m pip install --upgrade pip
git clone https://github.com/To-n-y/forum-api.git
cd forum-api
pip install -r requirements.txt.env file is already added
This api uses sqlite database, so create db folder in the root directory
mkdir dbYou can run this application in dev mode:
uvicorn app.main:app --reloadOr
make runYou can run tests using:
pytest -s -vOr
make testGo to Docker and then Settings -> Resources -> FileSharing. Add project folder and click Apply & Restart To run an app using Docker, you need to run Docker containers by typing simple command:
docker-compose up
Now you can access the app at http://127.0.0.1:8000