As a developer, how to display notifications on MacOS
If you are using Node.js and want to create notifications on multiple platforms including Apple, this library probably has what you want:

https://github.com/mikaelbr/node-notifier

disclaimer: I am not the author