Answer the question
In order to leave comments, you need to log in
How to make a dynamic page for a large number of nuxt.js posts?
Hello!
I made a dynamic page for events that are loaded from the api on the landing page. When you follow the link from the landing page, everything works as it should, but when you go to this page from scratch, an error pops up (404 Not Found). The same error occurs when reloading the page
I googled the option with dynamic route generation, but it does not seem possible, since there are more than 100k events
import axios from 'axios'
const dynamicRoutes = () => {
return axios.get('https://your-api-here/products').then((res) => {
return res.data.map(product => `/product/${product.id}`)
})
}
Answer the question
In order to leave comments, you need to log in
This is not a way to store data, but a way to back up.
You make a server, set up backup using at least the same Cobian backup or any other software that is acceptable to you. For users, apart from the tray icon, nothing will change.
https://en.nuxtjs.org/guide/dynamic-routes/ maybe so?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question