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)