Last active
December 2, 2020 17:40
-
-
Save CrashLaker/896101c256c88609013343918c6acd5f to your computer and use it in GitHub Desktop.
medium-grafana-simplejson-flask-boilerplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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