- Notifications
You must be signed in to change notification settings - Fork6
Backend for simple forum made with FastAPI and Piccolo ORM ecosystem.
License
NotificationsYou must be signed in to change notification settings
sinisaos/headless-forum-fastapi
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Backend for simple forum made withFastAPI andPiccolo ORM ecosystem.
Clone repository in fresh virtualenv.
git clone https://github.com/sinisaos/headless-forum-fastapi.git
cd headless-forum-fastapipip install -r requirements/requirements.txt
sudo -i -u yourpostgresusername psqlCREATE DATABASE forum;\q;
Create.env
file in root of the project.
DB_NAME=your db nameDB_USER=your db usernameDB_PASSWORD=your db passwordDB_HOST=your db hostDB_PORT=your db portSECRET_KEY=your secret keyALGORITHM="HS256"ACCESS_TOKEN_EXPIRE_MINUTES=30
./scripts/migrations.sh
./scripts/user.sh
Install test requirements.
pip install -r requirements/test-requirements.txt
Run tests.
./scripts/test.sh
./scripts/lint.sh
./scripts/start.sh
After site is running log in as admin user onlocalhost:8000/admin/ and add categories, topics etc.
For non admin user go to API docslocalhost:8000/docs/ where you can register.
After that you can login with Authorize button to access protected routes.