Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6087522
commit 4072abc
Showing
3 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Gin | ||
category: Handbook | ||
position: 250 | ||
position: 252 | ||
badge: Starter | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: Rocket | ||
category: Handbook | ||
position: 252 | ||
position: 253 | ||
badge: Starter | ||
--- | ||
|
||
|