Company
Date Published
Author
Kevin Whinnery
Word count
1166
Language
English
Hacker News points
None

Summary

This application uses Node.js and the Express framework to send automatic server notifications through SMS and MMS when an exception occurs. To do this, it sets up a Twilio REST client with account SID, auth token, and sending number from environmental variables. It then creates a JSON formatted list of administrators who should be notified in case of emergency and implements error handling and message delivery as a piece of Express.js middleware. The middleware reads the administrator's phone numbers, formats an error message, sends the SMS using Twilio's REST API, and calls the next middleware in the chain with the error object.