This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A proxy for sending/receiving SMS via IRC | |
// | |
// This code is part of our family IRC server whose code is available at | |
// https://gist.github.com/mndrix/7947009178e4a18c247b4bd25821661f | |
// | |
// This file won't compile by itself because it's only one file from | |
// my larger family server (movie hosting, Asterisk dialplan, Git | |
// hosting, personal assistant, etc). | |
// | |
// Copyright 2018 Michael Hendricks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// My small, family IRC server | |
// | |
// This file won't compile by itself because it's only one file from | |
// my larger family server (movie hosting, Asterisk dialplan, Git | |
// hosting, personal assistant, etc). | |
// | |
// Users authenticate via NICK and PASS. The USER is interpreted as a | |
// "device" name. That allows each user to connect from multiple | |
// devices simultaneously while still appearing as only one nick in | |
// channels. Each nick-device combo has a queue of messages which |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.