In the Vuex Store, I define nuxtServerInit() which doesn't initialize at all!
import Vuex from 'vuex'
import mod1 from './modules/mod1'
import mod2 from './modules/mod2'
const store = () => {
return new Vuex.Store({
actions: {
nuxtServerInit() {
setTimeout(() => console.log('Hello'), 10000)
}
},
modules: {
mod1,
mod2
}
})
}
export default store
Am I doing something wrong? Please help!
nuxtServerInitruns on the server. Is it printing to your command line console? Are you running inspamode? - David WeldonSPAmode. I am on universal mode - Damonaxiosdoesn't work innuxtServerInit()- Damon