Update server.js

Updated to return JSON string with useful information.