Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuxtServerInit #788

Open
andysunda opened this issue Nov 8, 2022 · 0 comments
Open

NuxtServerInit #788

andysunda opened this issue Nov 8, 2022 · 0 comments

Comments

@andysunda
Copy link

Hello all, I have been trying to use NuxtServerInit with Vuex ORM, and thus far, I have had no success.
Is it possible to use NuxtServerInit to make retreive data from the backend, and hydrate the Vuex ORM database? I don't have much more than the setup from the documentation. I have tried different things without success, and I am hoping that someone may have an example of how to set this up. I would like to use NuxtServerInit to hydrate the Comments if possible.

database/index.js

import { Database } from '@vuex-orm/core'
import Comment from '@/models/Comment'
const database = new Database()
database.register(Comment)
export default database

store/index.js

import VuexORM from '@vuex-orm/core'
import database from '@/database'
export const plugins = [
VuexORM.install(database)
]

Thanks! Andy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant