Soca is a system that wraps a CCTV NVR and expose it as API. This app built with FastAPI.
You can start editing the app by modifying files inside the soca
folder. The app auto-updates as you edit the file.
.
└── soca
├── application # Application business rules
├── domain # Enterprise business rules
├── infrastructure # Framework and drivers
└── presentation # User interface
-
Set up the development environment
You need to set up your development environment before you can do anything.
-
Install the dependencies
poetry install
-
Run in development mode
uvicorn soca.main:app --host 0.0.0.0 --reload
Open http://localhost:8000 with your browser to see the result. You can also check the API documentation at http://localhost:8000/docs.
-
Start the Uvicorn server
uvicorn soca.main:app --host 0.0.0.0 --port 80
To learn more about FastAPI, take a look at the following resources:
- FastAPI Documentation - learn about FastAPI features.