Skip to content

Commit

Permalink
feat: add flask support
Browse files Browse the repository at this point in the history
  • Loading branch information
fredliang44 committed May 4, 2021
1 parent 6087522 commit 4072abc
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
62 changes: 62 additions & 0 deletions content/en/handbook/flask.md
@@ -0,0 +1,62 @@
---
title: Flask
category: Handbook
position: 250
badge: Starter
---

## Init flask project via cli

> cli init method will creat folder with name `flask` in the current directory.
```shell
lets init flask
```

## Run flask locally to test project

> You have to install flask in advance: [Flask Quickstart](https://flask.palletsprojects.com/en/1.1.x/quickstart/)
```shell
flask run
```

## Define you dependency in your pythons projects

<code-group>
<code-block label="manually" active>

```bash
# manually config requirements.txt

echo "flask==1.1.2" > requirements.txt
```

</code-block>
<code-block label="pipenv">

```bash
# if you are using pipenv <https://github.com/pypa/pipenv>, you could directly init via `pipenv lock`

pipenv lock -r > requirements.txt
```

</code-block>
<code-block label="poetry">

```bash
# if you are using poetry <https://python-poetry.org/docs/cli/>, you could directly init via `poetry export`

poetry export -f requirements.txt --output requirements.txt
```

</code-block>
</code-group>

## Deploy to let.sh

> if you haven't install `lets`, please take a look at the documentation: [Cli Overview](/cli/overview).
```shell
lets deploy
```
2 changes: 1 addition & 1 deletion content/en/handbook/gin.md
@@ -1,7 +1,7 @@
---
title: Gin
category: Handbook
position: 250
position: 252
badge: Starter
---

Expand Down
2 changes: 1 addition & 1 deletion content/en/handbook/rocket.md
@@ -1,7 +1,7 @@
---
title: Rocket
category: Handbook
position: 252
position: 253
badge: Starter
---

Expand Down

0 comments on commit 4072abc

Please sign in to comment.