mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 23:00:18 +00:00
simplify
This commit is contained in:
@@ -1 +1 @@
|
||||
web: gunicorn httpbin:app -b "0.0.0.0:$PORT" -w 9 -k eventlet -t 3 --name httpbin
|
||||
web: gunicorn httpbin:app
|
||||
+1
-12
@@ -10,9 +10,7 @@ This module provides the core HttpBin experience.
|
||||
import base64
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
|
||||
import librato
|
||||
import timelibra
|
||||
|
||||
from flask import Flask, Response, request, render_template, redirect, jsonify, make_response
|
||||
from raven.contrib.flask import Sentry
|
||||
@@ -39,20 +37,11 @@ app = Flask(__name__)
|
||||
# Setup error collection
|
||||
sentry = Sentry(app)
|
||||
|
||||
metrics = librato.connect(
|
||||
os.environ.get('LIBRATO_USER'),
|
||||
os.environ.get('LIBRATO_TOKEN')
|
||||
).get_counter('httpbin-requests')
|
||||
|
||||
# ------
|
||||
# Routes
|
||||
# ------
|
||||
|
||||
@app.after_request
|
||||
def log_metrics(r):
|
||||
metrics.add(10)
|
||||
return r
|
||||
|
||||
@app.route('/')
|
||||
def view_landing_page():
|
||||
"""Generates Landing Page."""
|
||||
|
||||
+2
-6
@@ -5,11 +5,7 @@ Werkzeug==0.8.1
|
||||
argparse==1.2.1
|
||||
blinker==1.2
|
||||
decorator==3.3.2
|
||||
distribute==0.6.31
|
||||
eventlet==0.9.16
|
||||
greenlet==0.3.1
|
||||
gunicorn==0.13.4
|
||||
librato==0.2
|
||||
gunicorn==0.16.1
|
||||
raven==1.9.3
|
||||
simplejson==2.4.0
|
||||
wsgiref==0.1.2
|
||||
wsgiref==0.1.2
|
||||
Reference in New Issue
Block a user