CatOrNot/test.py
2020-01-06 16:11:15 +01:00

17 lines
361 B
Python

from flask import Flask, url_for
app = Flask("Kotely")
@app.route('/')
def api_root():
return 'Welcome'
@app.route('/articles')
def api_articles():
return 'List of ' + url_for('api_articles')
@app.route('/articles/<articleid>')
def api_article(articleid):
return 'You are reading ' + articleid
if __name__ == '__main__':
app.run(port="8809")