Skip to content

Instantly share code, notes, and snippets.

@CrashLaker
Last active December 2, 2020 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CrashLaker/896101c256c88609013343918c6acd5f to your computer and use it in GitHub Desktop.
Save CrashLaker/896101c256c88609013343918c6acd5f to your computer and use it in GitHub Desktop.
medium-grafana-simplejson-flask-boilerplate
from flask import Flask, request, jsonify
from flask_cors import CORS
app = Flask(__name__)
cors = CORS(app)
@app.route('/', methods=['GET', 'POST'])
def main():
return "você acessou o /"
@app.route('/search', methods=['GET', 'POST'])
def r_search():
return "você acessou o /search"
@app.route('/query', methods=['GET', 'POST'])
def r_querey():
return "você acessou o /query"
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8081)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment