For the love of poetry.
You can view the live demo [here].(https://bryokim.github.io/poetry-galore)
Blog Post on this project.
Authors:
- Brian
- Reagan
To run the application, you first need to clone this repository and move into the poetry-galore directory.
Next you need to install all the requirements required to run the application.
pip install -r requirements.txt
You'll be required to set the following environment variables.
Env variable | Description | Value |
---|---|---|
FLASK_APP |
Flask application to run | app |
APP_SETTINGS |
Configuration to be used by the app as in config.py. | config.TestingConfig -> Testing config. config.DevelopmentConfig -> Development config. config.ProductionConfig -> Production config. |
SECRET_KEY |
Secret key for session encryption. | A secret value. Defaults to guess-me |
SECURITY_PASSWORD_SALT |
Salt used for password encryption | A secret value. Defaults to very-important |
You'll also need a database to store and persist the data. You can opt to use SQLite for ease of setup or MySQL if you want more control over the database.
To use the SQLite database, set the DATABASE_URL
env variable to sqlite:///<db_name>.sqlite
For example:
export DATABASE_URL="sqlite:///poetry_galore_db.sqlite"
First of all you need to have MySQL installed. You can follow this tutorial to install and set up your MySQL.
After installing MySQL, you can create a new database to be used.
mysql -u <username> -p -e 'CREATE DATABASE <db_name>'
Replace username
with your MySQL username and db_name
with the database name.
Now set the DATABASE_URL
env variable to mysql+mysqldb://<username>:<password>@localhost/<db_name>
For example:
export DATABASE_URL="mysql+mysqldb://root:password@localhost/poetry_galore_db"
After setting up the database of your choice, you need to initialize and upgrade the database. Run the following commands to finish setting up your database.
flask db init
flask db migrate
flask db upgrade
After setting the environment variables, you can start the app.
flask run
You can navigate to http://127.0.0.1:5000 to view the application and use it.
You're always welcome to contributing.
poetry-galore
is licensed under the MIT license.