libvirt-front-py/index.py
2021-03-25 19:53:50 +00:00

15 lines
384 B
Python

#!/usr/bin/python3
url_path = "http://192.168.100.50:5000"
from bottle import run, route, request, template,get ,post
import urllib.request, json
@route('/')
def index():
contents = json.loads(urllib.request.urlopen(url_path).read().decode())
return template('index', name=contents)
if __name__ == '__main__':
run(host='0.0.0.0', port=5000, debug=True, reloader=True)