Local Notification Module Provider

The Local Notification Module Provider simulates sending a notification, but only logs the notification's details in the terminal. This is useful for development.


Register the Local Notification Module#

NoteThe Local Notification Module Provider is registered by default in your application. It's configured to run on the feed channel.

Add the module into the providers array of the Notification Module:

NoteOnly one provider can be defined for a channel.
medusa-config.ts
1import { Modules } from "@medusajs/framework/utils"2
3// ...4
5module.exports = defineConfig({6  // ...7  modules: [8    {9      resolve: "@medusajs/medusa/notification",10      options: {11        providers: [12          // ...13          {14            resolve: "@medusajs/medusa/notification-local",15            id: "local",16            options: {17              channels: ["email"],18            },19          },20        ],21      },22    },23  ],24})

Local Notification Module Options#

OptionDescription

channels

The channels this notification module is used to send notifications for. While the local notification module doesn't actually send the notification, it's important to specify its channels to make sure it's used when a notification for that channel is created.

Was this page helpful?
Edit this page