Blog Archives

Emailing a JavaScript Error

I wanted to get an email whenever my SailsJS (based on ExpressJS) app crashed. My logging stack consists of winston with a custom transport which emails me via AmazonSES. Instead of getting a nice stack trace, all I got was emails with {}

Posted in email, javascript, nodejs, servers, wherewolf Tagged with: , , , , , , ,

Javascript – Pretty Array to Human Readable String

To take a JS array like [“item1”, “item2”, “item3″….] into a nice human readable string of “item1, item2 & item3” with all the first items getting comma separated and the final one with an ampersand use: resultString = array.length >

Posted in javascript, servers Tagged with: , , , , ,