forked from Hypernode/tools.hypernode.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.py
More file actions
27 lines (18 loc) · 700 Bytes
/
server.py
File metadata and controls
27 lines (18 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from bottle import request
import bottle
import views.patches
import views.modules
# make available to UWSGI
app = application = bottle.Bottle()
# Propagate exceptions to uwsgi
app.catchall = False
@app.post('/modules/magerun<format:re:\.?(json|txt)?>')
def magerun_module_check(format='.json'):
format = format.lstrip('.').lower()
return views.modules.magerun(request, format)
@app.get('/patches/<edition>/<version>')
def find_required_patches_for_magento_version(edition, version):
edition = edition.title()
return views.patches.patch_requirements_for_version(edition, version)
if __name__ == '__main__':
app.run(host='localhost', port=8080, debug=True, reloader=True)