Home

Awesome

IO Functions Push Notification

This Azure Function Project manages all the aspects related to the Push Notifications.

It uses the Azure Notification Hub to enable the push notifications and the device management.

Sviluppo in locale

cp env.example .env
cp local.settings.json.example local.settings.json
yarn install --frozen-lockfile
yarn build
yarn start
open http://localhost/some/path/test

Environment variables

Those are all Environment variables needed by the application:

Variable nameDescriptiontypeRequired
SLOT_TASK_HUBNAMEThe unique slot task hubnamestringtrue
APPINSIGHTS_INSTRUMENTATIONKEYA valid Application Insights instrumentation keystringtrue
STORAGE_CONN_STRINGThe connection string of the Storage Accountstringtrue
NOTIFICATIONS_QUEUE_NAMEThe name of the queue that stores the Notification messagesstringtrue
NH_PARTITION_FEATURE_FLAGThe type of FF enabled fot NH partition. Possible values: "none" - "all" - "beta" - "canary"stringtrue
CANARY_USERS_REGEXThe regex used to discriminate canary usersstringtrue

Notification Hubs

Variable nameDescriptiontypeRequired
AZURE_NH_HUB_NAMEThe name of the Legacy Notification Hubstringtrue
AZURE_NH_ENDPOINTThe endpoint of the Legacy Notification Hub Namespacestringtrue
NH1_ENDPOINTThe endpoint of the first namespace of Notification Hubstringtrue
NH1_NAMEThe name of the Notification Hub in the first namespacestringtrue
NH1_PARTITION_REGEXThe regex which defines the user subset associated with the first namespace Namespacestringtrue
NH2_ENDPOINTThe endpoint of the second namespace of Notification Hubstringtrue
NH2_NAMEThe name of the Notification Hub in the second namespacestringtrue
NH2_PARTITION_REGEXThe regex which defines the user subset associated with the second namespace Namespacestringtrue
NH3_ENDPOINTThe endpoint of the third namespace of Notification Hubstringtrue
NH3_NAMEThe name of the Notification Hub in the third namespacestringtrue
NH3_PARTITION_REGEXThe regex which defines the user subset associated with the third namespace Namespacestringtrue
NH4_ENDPOINTThe endpoint of the forth namespace of Notification Hubstringtrue
NH4_NAMEThe name of the Notification Hub in the forth namespacestringtrue
NH4_PARTITION_REGEXThe regex which defines the user subset associated with the forth namespace Namespacestringtrue

Deploy

Deployment is automatized by a pipeline