Updated server.js to parse query string