Giter VIP home page Giter VIP logo

headless-forum-fastapi's Introduction

Backend for simple forum made with awesome Piccolo ORM ecosystem.

Open terminal and run:

virtualenv -p python3 envname
cd envname
source bin/activate
git clone https://github.com/sinisaos/headless-forum-fastapi.git
cd headless-forum-fastapi
pip install -r requirements.txt
sudo -i -u yourpostgresusername psql
CREATE DATABASE forum;
\q
touch .env
## put this in .env file
## DB_NAME="your db name"
## DB_USER="your db username"
## DB_PASSWORD="your db password"
## DB_HOST="your db host"
## DB_PORT=5432
## SECRET_KEY="your secret key"

## runing migrations for admin
piccolo migrations forwards user
piccolo migrations forwards session_auth
## runing migrations for site
piccolo migrations forwards forum
## create admin user
piccolo user create
uvicorn app:app --port 8000 --host 0.0.0.0 

After site is running log in as admin user on localhost:8000/admin/ and add categories, topics etc.

For non admin user go to API docs localhost:8000/docs/ where you can register.

After that you can login with Authorize button to access protected routes.

headless-forum-fastapi's People

Contributors

sinisaos avatar sourcery-ai-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.