Skip to content
Browse files

Add endpoint

  • Loading branch information...
1 parent 4475919 commit ccf41da835984ea798656d5c23db1edf7bf90f53 @kyleconroy kyleconroy committed Apr 5, 2012
Showing with 19 additions and 0 deletions.
  1. +1 −0 Procfile
  2. +18 −0 web.py
View
1 Procfile
@@ -0,0 +1 @@
+web: gunicorn web:app -b 0.0.0.0:$PORT -w 3
View
18 web.py
@@ -0,0 +1,18 @@
+import urllib
+import os
+from flask import Flask, jsonify
+
+app = Flask(__name__)
+
+@app.route("/<user>/<repo>")
+def index_with_url(user, repo):
+ return jsonify({
+ "user": user,
+ "repo": repo,
+ "license": "",
+ })
+
+if __name__ == '__main__':
+ port = int(os.environ.get('PORT', 5000))
+ app.run(host='0.0.0.0', port=port, debug=True)
+

0 comments on commit ccf41da

Please sign in to comment.
Something went wrong with that request. Please try again.