added flask stub
This commit is contained in:
parent
0c5aa41fd0
commit
a62632eb0a
6
components/entitiy_ident/README.md
Normal file
6
components/entitiy_ident/README.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Super Lightweight Flask Web Server
|
||||||
|
* `pip install requirements.txt`
|
||||||
|
* `python entitiy_ident_service.py`
|
||||||
|
* `http://127.0.0.1:5000` -> `Hello World`
|
||||||
|
* `http://127.0.0.1:5000/api1` -> `api1`
|
||||||
|
* `http://127.0.0.1:5000/api2` -> `api2`
|
||||||
22
components/entitiy_ident/entitiy_ident_service.py
Normal file
22
components/entitiy_ident/entitiy_ident_service.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
from flask import Flask
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
def hello_world():
|
||||||
|
return 'Hello World'
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/api1')
|
||||||
|
def api1():
|
||||||
|
return 'api1'
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/api2')
|
||||||
|
def api2():
|
||||||
|
return 'api2'
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run()
|
||||||
1
components/entitiy_ident/requirements.txt
Normal file
1
components/entitiy_ident/requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
flask
|
||||||
Loading…
x
Reference in New Issue
Block a user