beginning of flask app
This commit is contained in:
parent
2342b4aeef
commit
fd9d6ebb64
18
oyster/web.py
Normal file
18
oyster/web.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
from flask import Flask
|
||||||
|
from .client import Client
|
||||||
|
|
||||||
|
app = Flask('oyster')
|
||||||
|
|
||||||
|
@app.route('/doc/')
|
||||||
|
def doc_list():
|
||||||
|
pass
|
||||||
|
|
||||||
|
@app.route('/doc/<path:url>/<version>')
|
||||||
|
def show_doc(url, version):
|
||||||
|
c = Client()
|
||||||
|
if version == 'latest':
|
||||||
|
version = -1
|
||||||
|
return c.get_version(url, version).read()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run()
|
Loading…
Reference in New Issue
Block a user