Update backend-svr.js

Use logic to determine the ip address, and add some debug code