99f3171d0d
* Can respond to very basic requests with dummy data * added editorconfig * added scripts for starting the flask-server in dev mode
22 lines
408 B
Python
22 lines
408 B
Python
from flask import Flask, escape, request
|
|
import json
|
|
import os
|
|
|
|
app = Flask(__name__)
|
|
|
|
@app.route('/')
|
|
def root():
|
|
return "Candymat Data Backend"
|
|
|
|
|
|
@app.route('/fragen')
|
|
def fragen():
|
|
with open('data/fragen.json', 'r') as json_file:
|
|
return json_file.read()
|
|
|
|
|
|
@app.route('/kandidaten')
|
|
def kandidaten():
|
|
with open('data/kandidaten.json', 'r') as json_file:
|
|
return json_file.read()
|