If you haven't heard, Nhost is a really cool preconfigured Hasura instance, with authentication / file storage built in!
Think Firebase on GraphQL, with the plus of all being open source.
So if you're looking for the next backend for your Nuxt project, give Nhost a try!
You can use my template to get started:
NHost Template for Nuxt
For detailed explanation on how things work, check out Nuxt.js docs.
NHost is cool. It's a PostgreSQL database with GraphQL, file storage, and authentication built in. You should check it out.
Preconfiguration
- GraphQL support from
@nuxtjs/apollo
- Authentication support from
@nuxtjs/auth
Apollo configuration
There is a configuration for apollo in plugins/apollo.js
which adds the bearer token to websocket requests (for subscriptions).
Auth configuration
The authentication has a custom configuration provided by plugins/refreshScheme.js
. This adds support for the JWT refresh scheme used by NHost.
There is also an auth configuration in plugins/auth.js
which handles whether a user should be able to access a page.
Style configuration
This project is preconfigured with Tailwind. It's pretty awesome, but if you want to use something else, remove the tailwind dependencies and add something new.
Template setup
From Github, you can click on Use this template
to create…
Top comments (0)