Skip to content

Commit 159acdd

Browse files
committed
returning some json
1 parent b0b2a86 commit 159acdd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

runner.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
from bottle import route, run, template
22

3-
@route('/guidedwiki/<name>')
4-
def index(name):
5-
return template('<b>Hello {{name}}</b>!', name=name)
3+
def fetchLinks(article_name):
4+
#fetch from neo4j here
5+
return [{ "id": 1, "name": "Test Item 1" }, { "id": 2, "name": "Test Item 2" }]
6+
7+
@route('/hack17/<article_name>')
8+
def returnLinks(article_name):
9+
articles = fetchLinks(article_name)
10+
return dict(data=articles)
611

712
run(host='localhost', port=8080)

0 commit comments

Comments
 (0)