Simple aiohttp User-login system using AngularJs routing and MongoDB
python 3.5+
pip3 install -r requirements.txt
check if docker is installed in your system.
If you are behind proxy, set proxy env in Dockerfile. Or else remove env.
docker build -t aio-app:latest .
Start container
docker run -d -p 8080:8080 aio-app
TODO:
- Write a docker compose for the service. Define networks for db and backend.
The application is configured with MongoDB env to store and perform queries in NoSQL.
MongoDB configuration is really simple. Provide the MongoDB URI in conf.json file.
TODO:
- Make ssl connection between server and database.
- Update, delete users.
If you don't want to connect to mongoDB with URI, username, password and db server instead, you will find following code snippet useful.
import pymongo
connection = pymongo.MongoClient(host, port)
db = connection[db_name]
db.authenticate(username, password)
customer_db = db[collection_name]
Don't write a custom ODM for just user login. Pymongo provides rich tools.
python3 run.py