[Vuejs]-Deploy dynamic routes with nuxt.js

0👍

Fixed it like this:

generate: {
    routes() {
      return axios.get('http://xxx.xxx.xxx.xx/casinos').then(res => {
        return res.data.map(casino => {
          return {
            route: '/casinos/' + casino.Slug,
            payload: casino
          }
        })
      })
    }
  },

Leave a comment