Backend source code for devquotes.netlify.com. The quotes you browse are delivered from here, along with other very useful endpoints.
- Flask
- PostgreSQL
- Firebase for authentication
- Pipenv for managing dependencies
- Heroku as hosting provider
Clone this repo and install the dependencies by running:
$ git clone https://github.com/bertdida/devquotes-flask.git
$ cd devquotes-flask
$ pipenv install
PostgreSQL is the database of choice for this project. You can download the community client, pgAdmin, on this page.
Create a local database and rename .env.example to remove .example and set its SQLALCHEMY_DATABASE_URI
to your database URL.
This project uses firebase for authentication. Therefore a firebase service account key is required. Follow this guide to generate a private key file in JSON format.
Inside your .env file, set the FIREBASE_CREDENTIAL
to the path of your firebase service account key.
Activate the Pipenv shell and run the database migration.
$ pipenv shell
$ flask db upgrade
Start the app.
$ python run.py
When you have your admin user logged in on the app, you can seed the database by running.
$ flask seed
Any contributions are always welcome! If you have any problem, idea, or suggestion for the project, feel free to create issues or pull requests.
Herbert Verdida / @bertdida