refactor and rewrote node server from previous chat repository, repurposed for parley.js