detect if in browser or nodejs
clone db._server