Skip to content
This repository has been archived by the owner on Feb 2, 2020. It is now read-only.

Commit

Permalink
get ready for the graph
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed Jan 29, 2020
1 parent 25b9ce8 commit a846243
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import requests

import cachetools
from flask import Flask, request, jsonify, render_template, make_response
from flask import (
Flask, request, make_response, jsonify, render_template)

REPOS = cachetools.LRUCache(maxsize=128)
RATES = cachetools.LRUCache(maxsize=96)
Expand Down Expand Up @@ -109,7 +110,10 @@ def index():

@app.route('/report')
def report():
return jsonify(_make_report_data(iso=True))
data = _make_report_data(iso=True)
resp = make_response(jsonify(data))
resp.headers['Access-Control-Allow-Origin'] = "*"
return resp


@app.route('/payload', methods=['POST'])
Expand Down
2 changes: 1 addition & 1 deletion run_locally.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

export FLASK_APP=app.py
python -m flask run --port=4632
python -m flask run

0 comments on commit a846243

Please sign in to comment.