View difference between Paste ID: TW4UXJB0 and Ez7EuHQp
SHOW: | | - or go back to the newest paste.
1
import bottle
2
import json
3
4
5
@bottle.route('/', methods=['GET'])
6
def index_html():
7-
  var result = {'this': 'is', 'the': 'result'}
7+
  result = {'this': 'is', 'the': 'result'}
8-
  var json = json.dumps(result)
8+
  json = json.dumps(result)
9
  return '<!DOCTYPE html><script>var s = JSON.parse(' + json + '); alert(s["the"]);</script>';
10
11
bottle.run(host='0.0.0.0', port=8080)