This Flask app template offers a robust foundation for your project. With TailwindCSS, you get flexible styling, and the project’s tree structure is adaptable to any Flask project. Whether you’re a beginner or a seasoned developer, this template simplifies your workflow, making it an ideal choice for any project.
.
├── app.py
├── config.py
├── package.json
├── package-lock.json
├── README.md
├── requirements.txt
├── static
│ ├── css
│ │ ├── input.css
│ │ └── output.css
│ ├── images
│ │ ├── flask.svg
│ │ └── tailwindcss.svg
│ └── js
├── tailwind.config.js
├── templates
│ └── index.html
└── views
└── root.py
7 directories, 13 files
git clone <repo-url>
pip install -r requirements.txt
python3 app.py
Create a .env file in the root directory and add the following:
FLASK_ENV='development' # the app by default runs in development mode
SECRET_KEY='your_secret_key'
DEVELOPMENT_DATABASE_URI=sqlite:///development_sqlite3.db
TESTING_DATABASE_URI=sqlite:///testing_sqlite3.db
PRODUCTION_DATABASE_URI=sqlite:///your_production_database.db
You can generate a secret key using the following command:
python3 -c 'import os; print(os.urandom(16).hex())'
To watch the changes in your CSS file, run the following command:
npm run watch