Created
April 1, 2015 03:30
-
-
Save giobyte8/3cb13c3544114880593a to your computer and use it in GitHub Desktop.
Parte 3 | Creando un sistema de chat sobre NodeJS con Socket.IO, ExpressJS, MongoDB, Foundation y Openshift
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
/** | |
* Cuando el servidor envia los ultimos mensajes registrados | |
* se reciben a través de este evento. | |
* Cada mensaje se agrega a la lista de mensajes en la vista | |
* de la conversación. | |
*/ | |
socket.on('latest messages', function (messages) { | |
for (var i = messages.length - 1; i >= 0; i--) { | |
appendMessage(messages[i]); | |
}; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment