Skip to content

Instantly share code, notes, and snippets.

Created Jul 10, 2016
What would you like to do?
from bottle import route, run, HTTPResponse
import os
def json():
body = {"status": "OK", "message": "hello world"}
r = HTTPResponse(status=200, body=body)
r.set_header("Content-Type", "application/json")
return r
run(host="", port=int(os.environ.get("PORT", 5000)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment