Coder Social home page Coder Social logo

nhost-template's Introduction

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 a new repository based on this one.

Alternatively, you can create a new repository from your terminal:

# Clone this repo
$ git clone https://github.com/MarcelloTheArcane/nhost-template -b master --single-branch <project-name>

# Enter the new directory
$ cd <project-name>

# Replace origin with your repository url
$ git remote set-url origin <git repository>

# Send this repository to the remote
$ git push --origin master

# Add template repository
$ git remote add template https://github.com/MarcelloTheArcane/nhost-template

Environment variables

Modify the .env file to use the urls from NHost. You will need to add urls for GraphQL and auth.

Getting started

# Install the dependencies
$ yarn

# Start the development server
$ yarn serve

To run in production, use the start command

$ yarn start

Updating from template

Fetch from the template remote. If you cloned via github, you will need to add the remote as above.

$ git fetch --all --allow-unrelated-histories

nhost-template's People

Contributors

marcellothearcane avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.