|───backend_dev_test
| |────Backend_test/
| | |──────src/
| | | |────endpoints/
| | | | |────__init__.py
| | | | |────user_management.py
| | | | |────publication_management.py
| | | | |────swagger.py
| | | |────__init__.py
| | | |──────api_spec.py
| | | |──────app.py
| | | |──────db.sqlite
| | | |──────models.py
| | |──────tests/
| | | |────conftest.py
| | | |────test_endpoints.py
| | |──────migrations/
open your git bash and write
$ git clone https://github.com/jeer2234/backend_dev_test.git
$ cd backend_dev_test
$ python -m venv env
on Windows cmd
$ env\Scripts\activate.bat
on bash shell
$ env/bin/activate
$ pip install -r requirements.txt
Once you have Postgres installed and running, create a database called backend_dev
$ psql
# create database backend_dev;
CREATE DATABASE
# \q
$ set DATABASE_URL="postgresql:///backend_dev"
$ python -m pytest
$ cd backend_test\src
$ flask run
In flask, Default port is 5000
Go to Swagger document page: http://127.0.0.1:5000/api/docs