Example of a monolithic web application using Hasura GraphQL Engine + Node.js + Next.js
MIT License
This is a sample fullstack web application incorporating the following:
Requires Node.js >= v14, yarn package manager v1, & docker ( Docker Desktop >= v3.2 for Windows & Mac, or Docker Engine >= v19.03 for Linux).
Copy contents of .env.example
to .env
and optionally fill in values (defaults should work).
yarn install
Start development db with yarn db
(needs to be running for either of next two tasks)
Start app in dev mode with yarn dev
, or start app in production mode with yarn start
.
When the app is started in dev mode:
hasura/migrations/
& hasura/metadata/
which can be committed to Git.web/graphql/generated.ts
).graphql
file.yarn _hasura
, e.g. yarn _hasura seed apply
or yarn _hasura --help
.Use the Dockerfile in the project root
and define the variables documented in .env.example
.
heroku stack:set container -a your-app-name-here
.DATABASE_URL
environment variable. Be sure to copy it to HASURA_GRAPHQL_DATABASE_URL
HASURA_GRAPHQL_CLI_ENVIRONMENT=default
as per