I cloned the superset code in local and there was already a FLASK server file named app.py , app.py
def create_app() -> Flask:
app = SupersetApp(__name__)
try:
# Allow user to override our config completely
config_module = os.environ.get("SUPERSET_CONFIG", "superset.config")
app.config.from_object(config_module)
app_initializer = app.config.get("APP_INITIALIZER", SupersetAppInitializer)(app)
app_initializer.init_app()
print('Hello world')
return app
# Make sure that bootstrap errors ALWAYS get logged
except Exception as ex:
logger.exception("Failed to create app")
raise ex
and I tried adding another function inside the same file but not gets called from the react end,
new function
api = Flask(__name__)
@api.route('/api/profile')
def my_profile():
response_body = {
"name": "Nagato",
"about" :"Hello! I'm a full stack developer that loves python and javascript"
}
return response_body
But it shows http://localhost:8088/api/profile 404 not found error.
Note : I am new to react.js .So, forgive me if my question is very dumb..