Skip to content

Instantly share code, notes, and snippets.

@vladimirlukyanov
Last active April 23, 2018 07:23
Show Gist options
  • Select an option

  • Save vladimirlukyanov/7eede6db3799cfcc93575253e82a0ecd to your computer and use it in GitHub Desktop.

Select an option

Save vladimirlukyanov/7eede6db3799cfcc93575253e82a0ecd to your computer and use it in GitHub Desktop.
Nuxt.js 404 error handling | Nuxt.js 404 redirect | Nuxt.js middleware routing
import bodyParser from 'body-parser'
import morgan from 'morgan'
import session from 'express-session'
export default {
head: {
title: 'Auth Routes',
meta: [
{charset: 'utf-8'},
{name: 'viewport', content: 'width=device-width, initial-scale=1'},
{hid: 'description', content: 'Auth Routes example'}
]
},
css: [
'~assets/css/bootstrap.min.css',
'~assets/css/app.css',
'~assets/css/font-awesome.min.css',
],
plugins: [],
build: {
analyze: false,
watch: ['api']
},
loading: {color: '#41B883'},
router: {
linkActiveClass: 'active',
middleware: ['404-redirect'] // important to add
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment