File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Flask minimal example
2
2
3
- ## Running with PyCharm
4
- Run this project in Pycharm as Flask application. Then send a request with the browser, curl or Postman.
5
-
6
3
## Running on a remote server
7
4
5
+ ### One-line command (new installation)
6
+
7
+ ``` bash
8
+ git clone https://github.com/mikbuch/flask_minimal_example && cd flask_minimal_example && sudo apt-get install python3-pip && sudo pip3 install pipenv && pipenv install --python $( which python3) && sudo $( pipenv --venv) /bin/flask run --host=0.0.0.0 -p 80
9
+ ```
10
+
11
+ ## Re-running the application
12
+
13
+ On the server when the application was previously installed you can just run flask application.
14
+
8
15
If your virtual environment is already installed and you are just (re)starting the server (Flask application) use the below command:
9
16
```
10
17
sudo $(pipenv --venv)/bin/flask run --host=0.0.0.0 -p 80
18
25
* ` $USER ` is your username (where virtual environment was created)
19
26
* ` $XYZ ` and ` $ABCDE ` are hash codes for the directory of the virtual environment
20
27
21
- ## Installation
28
+ ## Installation (step-by-step)
22
29
23
30
First clone this repository to the remote server:
24
31
```
85
92
ImmutableMultiDict([('some_param', '3')])
86
93
--------------------
87
94
```
95
+
96
+ ## Development
97
+
98
+ ### Running with PyCharm
99
+ Run this project in Pycharm as Flask application. Then, to send a request with the browser, use curl or Postman.
You can’t perform that action at this time.
0 commit comments