The fastest way to launch the application is to use docker-compose. Create .env file. The default port application is running is 4200.
docker-compose -d upBefore you start application you have to configure PostgreSQL database.
Then run following commands to run your project:
git clone https://github.com/avadeu/esppm
cd esppm
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtThere's one last step before you launch an application which is creating .env file (or modifying .env.example) in project's root directory.
Do not use application with default values from .env.example It will make your application vulnerable. |
The last step us to launch application. There are two ways to do it.
-
First one is to configure settings we care about in
conf.tomlfile and runlaunch.pymodule.python launch.py
-
Second way is to manually start server using
uvicorn.uvicorn app.api.application:app --host 0.0.0.0 --port 8080
Files related to application are in the app or tests directories.
Application parts are:
app
βββ api - web related stuff.
β βββ db - db related stuff.
β βββ routes - web routes.
β βββ errors - definition of error handlers.
β βββ dependencies - dependencies for routes definition.
β βββ models - database models for application.
β βββ domain - sqlalchemy orm models.
β βββ schemas - schemas for using in web routes.
βββ security - code related to authentication, security.
β βββ encryption - everything related to data encryption.
βββ utils - general project utility tools.
βββ application.py - FastAPI application creation and configuration.
