Flask VS Express

Honestly, I would not bother with Express if you’re a beginner at coding, I would use flask. But after you master the basics, I would really recommend Express because its faster and better.

5 Likes

I would bother with express as a beginner though, you choose what you want.

5 Likes

Good point, but

they are virtually the same thing…

4 Likes

Yes but Express is faster and you can do more with it.

4 Likes

Like what? :thinking:

You can do more in Javascript than in Python in terms of web development, which is why I favor Express.

4 Likes

That doesn’t answer the question :upside_down_face:

3 Likes

Database stuff and you can use it to directly connect with the web Javascript. React.js would probably be good, too.

3 Likes

??? I’m assuming you’re not talking about ReplDB but which are you talking about lol?

How? Socket.io? There are Python libraries to use socket.io with Flask, and you can use Python functions/variables in JS with Jinja :upside_down_face:

That’s a frontend framework, so you could do React with Express or Flask.

4 Likes

flask is better for one reason. You dont have to write as much javascript

1 Like

I’m not going to sacrifice performance so I can write less.

2 Likes

The thing is, Python databases are really, really slow, which is why I like Express better. You also can’t use Python variables or anything like that to connect to the web js, and Express can do that easily.

I meant you could also use React with Express, I don’t really even know how you would do that on a Flask server.

One more point, Flask servers are really slow and they aren’t asynchronous at all, which makes them a really awful option in web development. Look at any website today, I bet they don’t use Flask servers at all.

flask is used in plenty of websites, just google it

1 Like
@app.route("/")
def index():
    return render_template("index.html", username=web.auth.name)
<script>location.href = {{ username }}</script>

(well you can redirect in flask so this example is kinda useless but eh)


You’re not answerin ma questions man


It’s actually pretty simple. If you’re good with nix and stuff (like 9pfs) you can do it on the same Repl, but I’d recommend creating two Repls: Python Flask backend and React frontend. Then in the React Repl, make requests to your backend API.

1 Like

Flask isn’t used in modern websites as much as Express, I’m sure its quite obvious.

1 Like

Honestly who would even use flask-socketio when its way more efficient in Express. You can do the same in Flask compared to Express, but its just better to use.

1 Like

i mean yeah i wouldnt assume so, with the popularity of js in web development (it literally isnt used for anything else as far as i know)

I could argue Express has much more documentation, and probably functionality as well (I’ve only recently started using Express, so I couldn’t tell you what that functionality actually is), it is also backed up by the entire Node community, and can be easily implemented alongside other popular npm packages, such as Socket.IO.

Not to mention, anyone that sees a forums website that uses Flask will probably experience some brain cell loss, for reasons described by @OmegaOrbitals and others.

2 Likes

The reason I don’t like Flask is because Python is just a bad language in my opinion. It’s just bad. And I’m not going to explain myself.

1 Like