Setup
Requirements
Installation
Add vuetify-strapi-page
dependency to your project:
yarn add vuetify-strapi-page
npm install vuetify-strapi-page
Then add vuetify-strapi-dashboard
to the modules
in nuxt.config.js
:
nuxt.config.js
{
modules: [
['vuetify-strapi-dashboard',
{
rtl: true,
lang: 'fa',
builder:{
form: '/forms',
group: '/groups',
element: '/elements',
record: '/records',
},
}
]
],
}
auth and axios config
recommended config for axios and auth:
nuxt.config.js
axios: {
changeOrigin: true,
baseURL: 'http://your-api-server-here',
debug: false
},
auth: {
strategies: {
admin: {
_scheme: 'local',
endpoints: {
login: {url: _.get(process, 'env.LOGIN_URL', '/auth/local'), method: 'post', propertyName: 'jwt'},
logout: {url: '/auth/logout', method: 'post'},
user: {url: '/users/me', method: 'get'}
},
tokenRequired: true,
tokenType: 'bearer',
autoFetchUser: true
}
},
redirect: {
login: '/admin/auth',
logout: '/admin/system/profile/logout',
callback: '/admin/login',
home: '/admin'
}
},