loading...

I made a Nuxt template for Nhost!

github logo ・1 min read

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

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…

twitter logo DISCUSS
Classic DEV Post from Aug 22 '19

Where in the world do you DEV?

Show off where in the world you DEV from!

Max Reynolds profile image

Sore eyes?

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❀️