updated server.js for use with updated templates