DEV Community

marcellothearcane
marcellothearcane

Posted on

2

I made a Nuxt template for Nhost!

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…

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay