Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bottle
- import json
- @bottle.route('/', methods=['GET'])
- def index_html():
- result = {'this': 'is', 'the': 'result'}
- json = json.dumps(result)
- return '<!DOCTYPE html><script>var s = JSON.parse(' + json + '); alert(s["the"]);</script>';
- bottle.run(host='0.0.0.0', port=8080)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement