initial version of js module, chat example logs messages