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.
- Clone the repository:
git clone https://github.com/lucaritossa/push-server.git
- Install dependencies:
npm install
- Create a Firebase project and get your server key from the Firebase console. Replace the content of
/firebase/fcm_service_account.json
To start the server, run the following command. The server will listen on port 3000 by default.
npm run dev
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.
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.
This project is licensed under the MIT License. See the LICENSE file for details.