Nextjs and python
Answered
In&Out posted this in #help-forum
In&OutOP
Hey folks, so I want to make a nextjs project, but it will fetch data from a python environment, and what i wanted to know is will it still be possible to make stuff update always without having to not refresh site? To work like a normal nextjs app?
18 Replies
In&OutOP
My plan is to make the whole site in nextjs, but use python just to fetch some data, routes and backend will be in nextjs
You can use python for backend and nextjs for frontend
Answer
For e.g. Python for api, nextjs for frontend
with python, you can build a flask server
In&OutOP
Okay, can do, but it will still be able to make data be shown whenever something changes without needing to refresh site?
@In&Out Okay, can do, but it will still be able to make data be shown whenever something changes without needing to refresh site?
Sorry, I didn't quite understand you
In&OutOP
Sorry english isnt first language, so a javascript site, whenever some data c hanges, the site data changes as well without having to refresh site, tho with python frameworks you cant do t hat
Do you mean, you need to live update data on frontend, without refreshing site?
In&OutOP
yes
Well, I guess you could add a revalidate tag
In&OutOP
ughhhhhh
Another solution is there
You can revalidatePath every x seconds
to look for data changes and auto update it
I guess Some more experienced people could provide you more info
In&OutOP
think that'll suffice, thanks
just wanted to know if live update was possible