CatOrNot/test.py

17 lines
361 B
Python
Raw Permalink Normal View History

2020-01-06 16:11:15 +01:00
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")