https://github.com/liveblocks/next-js-examples
https://github.com/liveblocks/next-js-examples
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/liveblocks/next-js-examples
- Owner: liveblocks
- License: apache-2.0
- Archived: true
- Created: 2021-05-26T19:10:59.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-29T19:54:17.000Z (over 4 years ago)
- Last Synced: 2024-11-09T00:34:50.484Z (over 1 year ago)
- Language: TypeScript
- Size: 961 KB
- Stars: 33
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deprecated
This repository is deprecated, for Next.js examples please use:
- [https://github.com/liveblocks/liveblocks/tree/main/examples/nextjs-live-avatars](https://github.com/liveblocks/liveblocks/tree/main/examples/nextjs-live-avatars)
- [https://github.com/liveblocks/liveblocks/tree/main/examples/nextjs-todo-list](https://github.com/liveblocks/liveblocks/tree/main/examples/nextjs-todo-list)
- [https://github.com/liveblocks/liveblocks/tree/main/examples/nextjs-whiteboard](https://github.com/liveblocks/liveblocks/tree/main/examples/nextjs-whiteboard)
- [https://github.com/liveblocks/liveblocks/tree/main/examples/nextjs-live-cursors](https://github.com/liveblocks/liveblocks/tree/main/examples/nextjs-live-cursors)
## [Liveblocks](https://liveblocks.io) × [Next.js](https://nextjs.org/).
This repo shows how to use Liveblocks with [Next.js](https://nextjs.org/).
## Getting started
### Run examples locally
- Install all dependencies with `npm install`
- Create an account on [liveblocks.io](https://liveblocks.io/dashboard)
- Copy your secret key from the [administration](https://liveblocks.io/dashboard/apikeys)
- Create a file named `.env.local` and add your Liveblocks secret as environment variable `LIVEBLOCKS_SECRET_KEY=sk_test_yourkey`
- Run `npm run dev` and go to [http://localhost:3000](http://localhost:3000)
### Run examples on CodeSandbox
- Open this repository on CodeSandbox with this [link](https://codesandbox.io/s/github/liveblocks/next-js-examples?file=/pages/live-cursors-basic.js)
- Create an account on [liveblocks.io](https://liveblocks.io/dashboard)
- Copy your secret key from the [administration](https://liveblocks.io/dashboard/apikeys)
- Create [secret](https://codesandbox.io/docs/secrets) named `LIVEBLOCKS_SECRET_KEY` with the secret key you just copied. You need to create an account on CodeSandbox to add an environment variable.
- Refresh your browser and you should be good to go!