A FCM relay server for SchoolSquirrel.
Run the docker container and specify the following environment variables:
type
project_id
private_key_id
private_key
client_email
client_id
auth_uri
token_uri
auth_provider_x509_cert_url
client_x509_cert_url
You can get those from the Firebase Console.
To send a notification, just make a post request to http(s)://serverurl.tld
with the payload in the request body.
You can only send notifications to specific devices using their token
. Sending to condition
s or topic
s is disabled for security reasons.
In addition, only the notification
and data
properties are allowed.
npm i
- Create a
.env
file and insert the credentials there (format:key=value
) npm start