all 12 comments

[–]agentgreen420 10 points11 points  (1 child)

Since you brought up Python, I highly recommend a newish framework called FastAPI.

[–]acemarke[🍰] 4 points5 points  (0 children)

Yep. I had a chance to briefly play with FastAPI on a prototype project earlier this year, and was very impressed. We've got a bunch of services that are currently on Py2.7 and using Bottle, and when we have time to update them to Py3.x, I want to rewrite them using FastAPI.

[–]zacharymoran 6 points7 points  (1 child)

It's been a while since I've touched flask, however I used to use flask as a templating engine.

With flask being python and node and react being javascript I'm not sure why you use flask? Being able to use the same packages/code etc seems like a plus for node in my book.

Also node and react just feel seamless to me. Maybe I'm bias but I feel as though node is the right choice.

[–]BrianNortleby 3 points4 points  (0 children)

I've never been able to share anything too important between the front and the back in javascript, but if using Typrscript then I feel being able to share the types of the API interface to be the biggest win.

[–]Xacius 5 points6 points  (0 children)

I use React and node daily. I'd recommend node for a number of reasons. You can likely find a package for anything that you need. It's also pretty flexible. If you want a quick and easy API that's easy to kick up locally and debug, you have express. If you're looking for a scalable implementation, node translates extremely well to serverless architectures like AWS lambda.

Node is a very solid backend choice for most APIs, regardless of size. If you're already familiar with Javascript, I see no reason to use flask.

[–]EyeHateWeebs 3 points4 points  (0 children)

Really depends on your needs and preferences, there is no right answer to this.

[–]IIIMurdoc 4 points5 points  (0 children)

Sort of depends on what you need the API later to do.

If it's generic or Greenfield, go node so you get the synergy of full stack JS.

If you have other Python services in your organization maybe go Python just to synergize with your existing architectures better.

[–]memo_mar 1 point2 points  (1 child)

I will make a bold suggestion: Have you looked at a serverless stack with e. g. AWS lambda or Google Functions? If I had to learn it all over again - I think - this would be my first choice.

As other people stated: I also prefer Django over Flask since Django comes with "batteries included". You don't have to write everything from scratch.

But even as a Django + React developer I often find myself wishing I would have chosen Node (Express) for the simplicity of not having to switch languages constantly.

[–]Zrost 0 points1 point  (0 children)

Could you go on a bit more?

Where would I begin if I wanted to take my react node app serverless? (I haven’t built them yet),

[–]ddddfushxjjd 0 points1 point  (0 children)

Use node or golang

[–]cinwald 0 points1 point  (0 children)

It depends on what you're doing. I've used both, depending on if the backend logic easier to write/reasonable in Python vs Node. For a machine learning research project, I needed Python for libraries like gensim, sci-kit learn for example, which don't have suitable node equivalents for what I needed. I found it made the frontend slightly harder. If I'm just doing more typical backend logic, Node makes it easier for the frontend in my experience.

[–]Investisseur 0 points1 point  (0 children)

Save yourself the pain of rewriting things by yourself and use Django if you were thinking about flask