diff --git a/index.html b/index.html
index c4dff57..97804b7 100644
--- a/index.html
+++ b/index.html
@@ -33,6 +33,13 @@
input.value = '';
}
});
+
+ socket.on('chat message', function(msg) {
+ var item = document.createElement('li');
+ item.textContent = msg;
+ messages.appendChild(item);
+ window.scrollTo(0, document.body.scrollHeight);
+ });