Reputation: 1
Fetching data from strapi and storing it somewhere during 'next build'.
I have a project with frontend written in NextJS which is taking data from Strapi. When I run the project live by 'next dev' from the frontend folder everything works fine but when I built the project with 'next build' and then run the project by 'next start' images fetched from Strapi API are not displayed without backend(Strapi) running in the background.
I am wondering if there is possibility to build and run the project without need to run backend to display everything correctly? Something like during 'next build' fetch all images from backend API (Strapi), store them somewhere and then run only frontend with those fetched files using 'next start'? Or there isn't such a possbility and backend always needs to be up?
Upvotes: 0
Views: 767