fix component structure
This commit is contained in:
parent
e3542eefb0
commit
8874135774
@ -1,6 +1,20 @@
|
||||
# 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`
|
||||
# AIC Django Middleware
|
||||
|
||||
## Tips
|
||||
* use Jetbrains Pycharm IDE
|
||||
* create and use a virtual environment
|
||||
|
||||
## Setup
|
||||
$ cd ./middleware
|
||||
|
||||
$ pip install -r requirements.txt
|
||||
|
||||
$ python manage.py makemigrations
|
||||
$ python manage.py migrate
|
||||
$ python manage.py createsuperuser
|
||||
|
||||
$ python mangge.py runserver
|
||||
|
||||
## ERROR handling
|
||||
<em>Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools"</em>
|
||||
<br>Install missing deps https://visualstudio.microsoft.com/visual-cpp-build-tools/
|
||||
|
||||
@ -1 +1,10 @@
|
||||
flask
|
||||
# install setup.py in dev mode
|
||||
-e .
|
||||
|
||||
Django==3.0.5
|
||||
djangorestframework==3.12.1
|
||||
djangorestframework-jwt==1.11.0
|
||||
django-cors-headers==3.5.0
|
||||
channels==3.0.1
|
||||
channels_redis==3.2.0
|
||||
whitenoise==5.2.0
|
||||
|
||||
@ -9,15 +9,6 @@ setup(
|
||||
version='0.0.0',
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
'Django==3.0.5',
|
||||
'djangorestframework==3.12.1',
|
||||
'djangorestframework-jwt==1.11.0',
|
||||
'django-cors-headers==3.5.0',
|
||||
'channels==3.0.1',
|
||||
'channels_redis==3.2.0',
|
||||
'whitenoise==5.2.0',
|
||||
],
|
||||
license='BSD License', # example license
|
||||
description='DESCRIPTION'
|
||||
)
|
||||
@ -1,2 +1,10 @@
|
||||
# install setup.py in dev mode
|
||||
-e .
|
||||
|
||||
Django==3.0.5
|
||||
djangorestframework==3.12.1
|
||||
djangorestframework-jwt==1.11.0
|
||||
django-cors-headers==3.5.0
|
||||
channels==3.0.1
|
||||
channels_redis==3.2.0
|
||||
whitenoise==5.2.0
|
||||
|
||||
@ -9,15 +9,6 @@ setup(
|
||||
version='0.0.0',
|
||||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
'Django==3.0.5',
|
||||
'djangorestframework==3.12.1',
|
||||
'djangorestframework-jwt==1.11.0',
|
||||
'django-cors-headers==3.5.0',
|
||||
'channels==3.0.1',
|
||||
'channels_redis==3.2.0',
|
||||
'whitenoise==5.2.0',
|
||||
],
|
||||
license='BSD License', # example license
|
||||
description='DESCRIPTION'
|
||||
)
|
||||
|
||||
@ -1,20 +1,6 @@
|
||||
# AIC Django Middleware
|
||||
|
||||
## Tips
|
||||
* use Jetbrains Pycharm IDE
|
||||
* create and use a virtual environment
|
||||
|
||||
## Setup
|
||||
$ cd ./middleware
|
||||
|
||||
$ pip install -r requirements.txt
|
||||
|
||||
$ python manage.py makemigrations
|
||||
$ python manage.py migrate
|
||||
$ python manage.py createsuperuser
|
||||
|
||||
$ python mangge.py runserver
|
||||
|
||||
## ERROR handling
|
||||
<em>Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools"</em>
|
||||
<br>Install missing deps https://visualstudio.microsoft.com/visual-cpp-build-tools/
|
||||
# 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`
|
||||
|
||||
@ -1,2 +1 @@
|
||||
# install setup.py in dev mode
|
||||
-e .
|
||||
flask
|
||||
6
components/x_way/README.md
Normal file
6
components/x_way/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/x_way/entitiy_ident_service.py
Normal file
22
components/x_way/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/x_way/requirements.txt
Normal file
1
components/x_way/requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
flask
|
||||
Loading…
x
Reference in New Issue
Block a user