Excerpted example of mongo project using aiohttp, motor and aiohttp_jinja2 (https://readthedocs.org/projects/aiohttp-jinja2/downloads/pdf/latest/), similar to flask one. this example work in windows python conda env, not in docker as intended in original https://github.com/aio-libs/aiohttp-demos
Clone repo and install library:
$ git clone [email protected]:aio-libs/aiohttp-demos.git $ cd aiohttp-demos
Install the app:
$ pip install -e . (no need pip install -r req.txt)
Create database for your project:: mongodb run in pwsh Start-Job -ScriptBlock { mongod --config ".sanicmotoprontodbmongodb.conf" }
cd .motortwit
python.exe .generate_data.py
Run application:
python.exe .main.py
Open browser:
http://127.0.0.1:9001
- aiohttp
- motor
- aiohttp_jinja2
- running instance of MongoDB