I deployed an app on Heroku. The app was created using this template.
I have a problem with the app, the problem is: when I navigate to a route like this /catg-1 and after I refresh I get a 404 page.
Note that I use history mode in vue-router.
These are the URL in my Django project:
const IS_PRODUCTION = process.env.NODE_ENV === 'production'
module.exports = {
outputDir: 'dist',
assetsDir: 'static',
publicPath: IS_PRODUCTION
? 'http://vue-django-bookmark.herokuapp.com/'
: '/',
// For Production, replace set baseUrl to CDN
// And set the CDN origin to `yourdomain.com/static`
// Whitenoise will serve once to CDN which will then cache
// and distribute
devServer: {
proxy: {
'/api*': {
// Forward frontend dev server request for /api to django dev server
target: 'http://localhost:8888/',
}
}
}
}
I deployed an app on Heroku. The app was created using this template. I have a problem with the app, the problem is: when I navigate to a route like this
/catg-1
and after I refresh I get a 404 page. Note that I use history mode in vue-router. These are the URL in my Django project:backend/urls.py
backend/bookmars/urls.py
And this is the
vue.config.js
file:routes
fromrouter.js
:Any help, please?
Thank you in advance.