This is a Next.js project bootstrapped with create-next-app
.
This project about complete challenge.
Firstly was created a new Project with https://cloud.hasura.io/ default setup.
With Postgres database on Heroku that created with Create Heroku Database
option.
All data(like long_tails table etc.) taken from challenge and inserted with Hasura interface into database.
The example.json
file is keeping in glitch as a simple project.
Firstly was generated a simple GraphQl query depends on database structure.The next step was about create an Action and Action handlers.
Relative to the documentation Action handlers was created and deployed with glitch, we use it for get the example.json
file and throw it to our Hasura app.
After all steps above are passed we can configure a simple endpoint using Hasura interface and mix our Query into database and Action with example.json to get all data together.
First, configure the .env.local
file.
cp .env.example .env.local
You can find .env.example
file in root of this project , that will have values like:
HASURA_API_URL=
HASURA_ADMIN_SECRET=
HASURA_API_URL
- this is URL of hasura project (using API rest).
HASURA_ADMIN_SECRET
- this is a key for authorization on Hasura.
Second, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
The home page of app will show you a menu with 3 links, that will redirect you to results pages.
You can find it by this LINK.
This app deployed using Vercel.
With environment configuration like in .env.example
.
All other configs are defaults for Vercel.
All glitch project that was mentioned in this doc have a default options of configuration.