You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
informaniac
4ef9c7f677
|
4 years ago | |
---|---|---|
static | 4 years ago | |
templates | 4 years ago | |
.gitignore | 4 years ago | |
README.md | 4 years ago | |
TODO | 4 years ago | |
config.py | 4 years ago | |
database.py | 4 years ago | |
ingredient.py | 4 years ago | |
initdb.sql | 4 years ago | |
re.db | 4 years ago | |
recipe.py | 4 years ago | |
redab.png | 4 years ago | |
redab.py | 4 years ago | |
requirements.txt | 4 years ago |
README.md
ReDab Private Repository
- extract materialize.css into 'static' folder
- create virtual environment
virtualenv -p python3 venv
- activate virtual environment
source venv/bin/activate
- install requirements
pip install -r requirements.txt
- set environment variables
export FLASK_APP='redab'
andexport FLASK_ENV='production'
- start server
flask run
- navigate to
localhost:5000
initialize the database
if this is your first run, you should initialize the database. this must be done while the server is running.
- if you opened another terminal, move to the project folder and set environment variables
export FLASK_APP='redab'
andexport FLASK_ENV='production'
- run
flask init-db
development
if you plan to develop, i suggest to remove the database file from the git working tree as a .gitignore
entry will be ignored since the file is already tracked in the repository.
git update-index --skip-worktree re.db
you will also want to use the development features of flask, such as auto-reload. to do this, just set the flask environment to development
export FLASK_ENV='development'