|
12 | 12 |
|
13 | 13 | Build and code-split your frontend assets across Blueprints using Flask-Assets. Accompanying tutorial on Hackers and Slackers here: https://hackersandslackers.com/flask-assets/
|
14 | 14 |
|
15 |
| -## Installation |
| 15 | +# Getting Started |
16 | 16 |
|
17 |
| -**Installation via `requirements.txt`**: |
| 17 | +Get set up locally in two steps: |
18 | 18 |
|
19 |
| -```shell |
20 |
| -$ git clone https://github.com/hackersandslackers/fflask-assets-tutorial.git |
21 |
| -$ cd flask-assets-tutorial |
22 |
| -$ python3 -m venv myenv |
23 |
| -$ source myenv/bin/activate |
24 |
| -$ pip3 install -r requirements.txt |
25 |
| -$ flask run |
26 |
| -``` |
27 |
| - |
28 |
| -**Installation via [Pipenv](https://pipenv-fork.readthedocs.io/en/latest/)**: |
29 |
| - |
30 |
| -```shell |
31 |
| -$ git clone https://github.com/hackersandslackers/flask-assets-tutorial.git |
32 |
| -$ cd flask-assets-tutorial |
33 |
| -$ pipenv shell |
34 |
| -$ pipenv update |
35 |
| -$ flask run |
36 |
| -``` |
37 |
| - |
38 |
| -**Installation via [Poetry](https://python-poetry.org/)**: |
39 |
| - |
40 |
| -```shell |
41 |
| -$ git clone https://github.com/hackersandslackers/flask-assets-tutorial.git |
42 |
| -$ cd flask-assets-tutorial |
43 |
| -$ poetry shell |
44 |
| -$ poetry update |
45 |
| -$ poetry run |
46 |
| -``` |
47 |
| - |
48 |
| -## Usage |
| 19 | +### Environment Variables |
49 | 20 |
|
50 | 21 | Replace the values in **.env.example** with your values and rename this file to **.env**:
|
51 | 22 |
|
52 |
| -* `FLASK_APP`: Entry point of your application (should be `wsgi.py`). |
53 |
| -* `FLASK_ENV`: The environment to run your app in (either `development` or `production`). |
| 23 | +* `FLASK_APP`: Entry point of your application; should be `wsgi.py`. |
| 24 | +* `FLASK_ENV`: The environment in which run your application; either `development` or `production`. |
54 | 25 | * `SECRET_KEY`: Randomly generated string of characters used to encrypt your app's data.
|
55 | 26 | * `LESS_BIN`: Path to your local LESS installation via `which lessc`.
|
56 | 27 |
|
57 | 28 | *Remember never to commit secrets saved in .env files to Github.*
|
58 | 29 |
|
| 30 | +### Installation |
| 31 | + |
| 32 | +Get up and running with `make deploy`: |
| 33 | + |
| 34 | +```shell |
| 35 | +$ git clone https://github.com/hackersandslackers/flask-assets-tutorial.git |
| 36 | +$ cd flask-assets-tutorial |
| 37 | +$ make deploy |
| 38 | +``` |
| 39 | + |
59 | 40 | -----
|
60 | 41 |
|
61 | 42 | **Hackers and Slackers** tutorials are free of charge. If you found this tutorial helpful, a [small donation](https://www.buymeacoffee.com/hackersslackers) would be greatly appreciated to keep us in business. All proceeds go towards coffee, and all coffee goes towards more content.
|
0 commit comments