Awesome
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 emptypublic/
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 sourceswhenfirebase deploy
is invoked. The only scripts you should need aredev
,clean
anddeploy
.