An open API service indexing awesome lists of open source software.

https://github.com/jod35/stackoverflow-lite

This is a simple Stack Overflow clone with Python ,Flask and PostgreSQL.
https://github.com/jod35/stackoverflow-lite

flask-sqlalchemy postgresql python webapp

Last synced: about 2 months ago
JSON representation

This is a simple Stack Overflow clone with Python ,Flask and PostgreSQL.

Awesome Lists containing this project

README

          

## StackOverFlow Lite

This is a simple clone of [StackOverFlow](https://stackoverflow.com) built so as to learn The Flask framework and relational databases.

## How it works
- Every User Creates an Account
- Evry user can sign in and out
- Users ask questions
- Other users can answer the questions

## Built With
- Python3
- Flask framework
- PostgreSQL
- HTML & CSS (front-end)

## How to run the app
* 1. get the project and enter its directory
`git clone https://github.com/jod35/StackOverflow-lite.git && cd StackOverflow-lite`

* 2. Create a virtual Environment
`python -m venv venv` and activate it with `source venv/bin/activate`
Install all application requirements with `pip install -r requirements.txt`

* 3. Create the Database
To do this, you need to edit `.env` and put your database URI forexample `postgresql://user:password@localhost:5432/db`
within the virtual environment run `flask shell` and then within the interactive console, `db.create_all()`

* 4. Finally run with
`export FLASK_APP=app.py`
`export FLASK_DEBUG=1` (In case you want to have debug mode on)

Finally run your app with `flask run`