Skip to content

Instantly share code, notes, and snippets.

@SebastianUdden
Created September 28, 2023 11:31
Show Gist options
  • Select an option

  • Save SebastianUdden/16a8cbb555e22a808b6336573a267afc to your computer and use it in GitHub Desktop.

Select an option

Save SebastianUdden/16a8cbb555e22a808b6336573a267afc to your computer and use it in GitHub Desktop.
from flask import Flask, jsonify
from flask_cors import CORS, cross_origin
app = Flask(__name__)
CORS(app)
@app.route('/api', methods=['GET'])
def greet():
return jsonify({'message': 'Hello python'})
if __name__ == '__main__':
app.run(debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment