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.
ebermergen-td/srv/ebermergen/__init__.py

24 lines
380 B
Python

import json
from flask import Flask, jsonify
5 years ago
from flask_cors import CORS
from .lib import generate_map
app = Flask(__name__)
5 years ago
CORS(app)
@app.route('/')
def index():
return 'Hello World'
@app.route('/generate')
def generate():
return jsonify(generate_map(10, 8))
@app.route('/generate/<int:x>/<int:y>')
def generate_var(x, y):
return jsonify(generate_map(x, y))