yasarmapper/app.py

25 lines
482 B
Python
Raw Normal View History

2024-01-18 07:50:00 +00:00
import os
from flask import Flask, render_template, jsonify
app = Flask(__name__)
@app.route('/api_key', methods=['GET'])
def api_key():
return jsonify({"apiKey": os.getenv("GOOGLE_API_KEY")})
@app.route('/save_shape', methods=['POST'])
def save_shape():
shape_data = request.json
# Process shape_data as needed
return jsonify({"status": "success"})
@app.route('/')
def home():
return render_template('map.html')
if __name__ == '__main__':
app.run()