Ably and Next.js Starter Kit

R
Renaudil y a 2 jours
0

Description

Ably + Next.js starter for serverless WebSocket, real-time notifications, activity streams, chat, collaborative multiplayer experiences etc.

npx boilerapp ably-nextjs-starter-kit

文档

Ably serverless WebSockets and Next.js fundamentals starter kit

Ably serverless WebSockets and Next.js fundamentals starter kit demo

Description

This Ably and Next.js fundamentals starter kit demonstrates using some of the Ably's core functionality with Next.js. You can build features and use cases upon these fundamentals such as notifications, activity streams, chat, realtime visualisations and dashboards, and collaborative multiplayer experiences.

The Ably fundamentals demonstrated within this repo are:

  • Token Authentication - authenticate and establish a persistent bi-direction connection to the Ably platform.
  • Pub/Sub (Publish/Subscribe) - publish messages on channels and subscribe to channels to receive messages.
  • Presence - keep track of devices that are present on a channel. This is great for tracking if a device is online or offline or indicating if a user is in a chat room when using Ably for Chat.
  • History - Retrieve a history of messages that have been published to a channel.

The project uses the following components:

  • Next.js, a flexible React framework that gives you building blocks to create fast web applications.
  • Ably, for realtime messaging at scale.

Building & running locally

Prerequisites

  1. Sign up or log in to ably.com, and create a new app and copy the API key.
  2. To deploy to Vercel, create a Vercel account.

Configure the app

Create a .env.local file with your Ably API key:

echo "ABLY_API_KEY={YOUR_ABLY_API_KEY_HERE}">.env

Run the Next.js app

npm run dev
# or
yarn dev

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Deploy with Vercel

Contributing

Want to help contributing to this project? Have a look at our contributing guide!

More info


Ably logo

Prix

Gratuit

FREE

评论 (0)

常见问题

常见问题解答 (FAQ)

有问题?我们有答案。如果您找不到想要的答案,请随时联系我们。

Boilerapp 是一个专门用于分享 Boilerplates、入门套件(Starter Kits)和项目模版的开发者社区平台。我们的目标很简单:为您节省初始配置(Setup)的时间,让您可以专注于真正重要的代码。无论您是在寻找简单的代码库还是完整的 SaaS 项目,都能在这里找到。

还有其他问题?

我们的团队随时为您提供帮助。联系我们,我们将尽快回复。

Ably and Next.js Starter Kit | BoilerApp