Polling App built on Next.js and Macrometa GDN, deployed on Vercel with the Vercel + Macrometa integration
Create the following collections in your federation:
vercel_polls (global document)
vercel_page_content (global document)
Make sure you have:
- Created all the resources in Macrometa GDN Setup section, and
- Generated an API key with the corresponding permissions.
- Run this 🔗 Query in 🔗 Macrometa GDN Console
Also, you will have to create a .env
from .env.sample
file to store your environment variables. This file must have the following env. variables:
MACROMETA_URL= {MACROMETA_URL}
MACROMETA_FABRIC_NAME= {MACROMETA_FABRIC_NAME}
MACROMETA_API_KEY= {MACROMETA_API_KEY}
MACROMETA_POLLS_COLLECTION_NAME= {MACROMETA_POLLS_COLLECTION_NAME}
NEXT_PUBLIC_MACROMETA_POLLS_COLLECTION_NAME= {NEXT_PUBLIC_MACROMETA_POLLS_COLLECTION_NAME}
MACROMETA_CONTENT_COLLECTION_NAME= {MACROMETA_CONTENT_COLLECTION_NAME}
First, clone the repository and cd
to the demo-vercel-pollingapp
directory.
git clone git@github.com:Macrometacorp/demo-vercel-pollingapp.git
Then, install the project's dependencies with
npm install
and finally, run
npm run dev
This will start a local development server on localhost:3000
.