Added external URL support in server.js