Skip to content

Node.js push notification server using firebase and FCM

Notifications You must be signed in to change notification settings

lucaritossa/push-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Push Server

This is a Node.js server that allows you to send push notifications to your users. It uses the Firebase Cloud Messaging (FCM) API to send notifications to Android and iOS devices.

Table of Contents

Installation

  1. Clone the repository: git clone https://github.com/lucaritossa/push-server.git
  2. Install dependencies: npm install
  3. Create a Firebase project and get your server key from the Firebase console. Replace the content of /firebase/fcm_service_account.json

Usage

Starting the Server

To start the server, run the following command. The server will listen on port 3000 by default.

npm run dev

Sending a Notification

To send a notification, make a POST request to /push/send. The JSON you have to send is the entire JSON content expected by FCM.

Contributing

Contributions are welcome! If you find any issues or want to enhance this project, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Node.js push notification server using firebase and FCM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%