Change javascript to not rely on localhost adress