Skip to content

bryokim/poetry-galore

Repository files navigation

Alt logoPoetry Galore

Alt screenshot

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

Alt github Alt linkedin

  • Reagan

Alt github Alt linkedin

Installation

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

Usage

Set env variables

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

Setup Database

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.

  • Using SQLite

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"
  • Using MySQL

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"

Initialize Database

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

Starting the app

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.

Contributing

You're always welcome to contributing.

License

poetry-galore is licensed under the MIT license.

About

For the love of poetry.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published