hgiasac / hasura-next-ts-boilerplate

Next.js Typescript boilerplate with Hasura GraphQL backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hasura-next-ts-boilerplate

Next.js Typescript boilerplate with Hasura GraphQL backend This project extends Next.js Typescript + Firebase example This sample SSR react application with Next.js, integrating Hasura backend Typescript Boilerplate

Prerequisites

Install project:

npm install

Copy src/dotenv to src/.env then edit your environment

Run Next.js development:

npm run dev

Run Firebase locally for testing:

npm run serve

Deploy it to the cloud with Firebase:

npm run deploy

Clean dist folder

npm run clean

Important

  • The empty placeholder.html file is so Firebase Hosting does not error on an empty public/ folder and still hosts at the Firebase project URL.
  • firebase.json outlines the catchall rewrite rule for our Cloud Function.
  • The Firebase predeploy hooks defined in firebase.json will handle linting and compiling of the next app and the functions sourceswhen firebase deploy is invoked. The only scripts you should need are dev, clean and deploy.

About

Next.js Typescript boilerplate with Hasura GraphQL backend

License:MIT License


Languages

Language:TypeScript 86.1%Language:JavaScript 13.8%Language:CSS 0.1%