Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dulajdeshan/nextjs-firebase-messaging

Example Next.js Application for Google Firebase Cloud Messaging
https://github.com/dulajdeshan/nextjs-firebase-messaging

cloudmessaging firebase firebasemessaging nextjs typescript

Last synced: about 1 month ago
JSON representation

Example Next.js Application for Google Firebase Cloud Messaging

Awesome Lists containing this project

README

        

# nextjs-firebase-messaging

Example Demo Next.js typescript application implemented with firebase cloud messaging to send web push notifications.

## Working Demo

[Demo](https://nextjs-firebase-messaging.vercel.app/)

## Getting Started

First create an `.env` file in the root directory. It should include following variables.

```bash
NEXT_PUBLIC_VAPID_KEY
NEXT_PUBLIC_FIREBASE_API_KEY
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN
NEXT_PUBLIC_FIREBASE_PROJECT_ID
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET
NEXT_PUBLIC_FIREBASE_MESSAGING_ID
NEXT_PUBLIC_FIREBASE_APP_ID
NEXT_PUBLIC_FIREBASE_SERVER_KEY
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID

```

First, run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

##