Hacker News new | ask | show | jobs
by bbor 609 days ago
I’m doing this with Quart on the python side and prisma for both (there’s a python prisma adapter! Crazy world) and I’ve been enjoying it. Biggest framework hurdle so far has been that next.js doesn’t have native support for Websockets, which is something you’re pretty likely to want if you’re bothering to run two full server processes. It’s not hard to implement them manually, but it isn’t as nice as just sticking everything on Socket.io.

Also, obviously, you should only do this if you have a really solid architectural vision for separating concerns; any requests that need to hit python naturally loose all of Next’s fancy optimizations for server<->client data passing, other than basic caching I guess. If you just want react itself, I’m pretty sure there are less framework/resource intensive ways to deliver SPAs and cut out the node server altogether - but that’s something of a guess.

Best of luck! The hardest part is remembering to switch between typescriptSyntax and python_syntax ;)