Help with Python Flask/HTML

Why does this seem not to be working? It keeps saying it can not be found and I’m really not sure what’s

1 Like

Add this line to the bottom of your main.py file:

app.run("0.0.0.0", 80)

And move your css and js into a folder called static.

If this post solved your problem, please mark is as the solution so the thread can close.

4 Likes

No im sorry it still doesnt seem to be working

Have you rerun the program?

2 Likes

yeah i have im really not sure whats wrong

This should be:

app.run(host='0.0.0.0', port=81)

IDK if the port number matters, but I copied this off of one of my Repls that works.

Port 80 works the best, because it’s the “official” port for HTTP.

2 Likes

I will change that in my Repl. Thank you.

1 Like

You don’t need to do that. The first two parameters are host and port, so you don’t need to specify.

1 Like

I still have no idea how to fix lol

Ah, here’s the problem. I found your Repl. You used the HTML, CSS, JS template. Instead, use the Python template (or the Flask template).

4 Likes

THANK YOU SO MUCH!! It all works now

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.