Skip to content

kyds3k/nextjs-with-realm-web-app-vercel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Realm-Web SDK Example

This example uses Realm-Web SDK to query a realm graphql endpoint using swr.

This example relies on MongoDB Realm for its GraphQL backend.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Using create-next-app

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example with-realm-web with-realm-web-app
# or
yarn create next-app --example with-realm-web with-realm-web-app

Download manually

Download the example:

curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-realm-web
cd with-realm-web

Install it and run:

npm install
npm run dev
# or
yarn
yarn dev

Deploy it to the cloud with Vercel (Documentation).

Configuration

To set up your app:

  1. Link a cluster that includes the Atlas sample data sets
  2. Configure permissions for the sample_mflix.movies collection. For this demo, you can assign ready only permissions for all authenticated users.
  3. Generate a collection schema for the sample_mflix.movies collection. Add a root-level "title" field to the schema with the value set to "movie".
  4. Enable anonymous authentication
  5. Once your app is set up, replace the value of NEXT_PUBLIC_REALM_APP_ID in .env file with your App ID

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published