Now updated to Flask 1.0.2
In this repo is flask web-app skeleton for a basic API or Flask powered website. The stylesheets are Sassy and Bootstrap 4 is included in the Sass libs folder. Everything you need here (except a Sass precompiler) to get started with a Flask App along with deployment instructions for Dreamhost.
- Python (preferrably Python3)
- Python Pip
- Pipenv for virtualenv & dependency management.
- SASS/SCSS compiler (or not, it's up to you. My SASS files are included in the repo.)
- Clone this repository
git clone [email protected]:trev-dev/flask-starter.git - Enter the flask-starter directory
cd flask-starter - Install dependencies and setup virtualenv with
pipenv install - Run the installation with
pipenv run python launcher.pyor by enteringpipenv shellprior to runningpython launcher.py - Edit/change/develop your site using Flask + Jinja2 (Or whatever other templating you wish to use)
- Setup hosting for a domain and ensure you have passenger enabled for Python apps.
- Use FTP/SFTP/Git to move your project to its destination on Dreamhost (/home/username/example.com). Be sure to avoid moving any caching or your env.
- You may need a custom installation of Python3 on Dreamhost for this to work. Please see Dreamhost's Documentation on how to do this. The Pipfile for this repo calls for python 3.7. You may use 3.6 if you update the pipenv Pipfile and delete the pipenv lockfile.
- Once you've verified a usable Python3 installation, install
pipenvon your Dreamhost server usingpip3 install pipenv. - From the website root folder, run
pipenv installto install the dependencies. - Wait a few minutes, then visit your website. It should be working. If not, Dreamhost has lots of documentation/support that can help you out. Enjoy!