Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 738 Bytes

README.md

File metadata and controls

18 lines (14 loc) · 738 Bytes

Todo Application

This is a simple todo example of using Sanic with MongoDB Motor and User session management with Sanic-auth

Usage

  1. Clone this repository
  2. Install the requirements from requirements.txt by $ pip install -r requirements.txt
  3. Serve using gunicorn : $ gunicorn app:app --worker-class sanic.worker.GunicornWorker

You might want to change Mongo Auth in app.py

def get_client():
	from motor.motor_asyncio import AsyncIOMotorClient

	from sanic import app
	client = AsyncIOMotorClient(host="mongodb://rootuser:passme123@localhost:27045", io_loop=app.get_event_loop())
	return client ```