You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
503 B
Python

from flask import Flask, render_template, jsonify
import random
from datetime import datetime
import json
import os
app = Flask('app')
@app.route('/')
def index():
return render_template('index.html')
@app.route('/api/datapoint')
def api_datapoint():
textDict = open('text.json',)
text = json.load(textDict)
dictionary_to_return = {
'text': text,
# 'pics': pics
}
return jsonify(dictionary_to_return)
# app.run(host='0.0.0.0', port=8080, debug=True)