3

I'm attempting to host a simple flask application on a hackathon project, but I'm running into an issue where it can not identify the routes. For example, say my flask route is:

@app.route('/helloWorld', methods=['POST'])
    def index():
        inputted_name = request.form['nm']
        return 'Hello World ' + inputted_name

and my index.html is

<html>
   <body>

      <form action = "{{ url_for('helloWorld') }}" method = "post">
         <p>Enter Name:</p>
         <p><input type = "text" name = "nm" /></p>
         <p><input type = "submit" value = "submit" /></p>
      </form>

   </body>
</html>

and my firebase.json

{
      "hosting": {
          "public": "folder_containing_above"
      }
}

While being hosted on firebase, I can't seem to get the html to talk to the flask route, and return the Hello world string. Instead it says

Page Not Found This file does not exist and there was no index.html found in the current directory or 404.html in the root directory.

Any help is appreciated!

Michael Eliot
  • 831
  • 8
  • 18

0 Answers0