Suggested way to use multiple drivers

Is there a suggested way to use multiple drivers?
import { drizzle } from 'drizzle-orm/neon-http';
import { drizzle as localhostDrizzle } from 'drizzle-orm/postgres-js';

const client = () => {
  if (process.env.SERVER) {
    return drizzle(neon(connectionString), { schema });
  }

  return localhostDrizzle(postgres(connectionString), { schema });
};

Above is what im currently doing (using pg docker image for my local db), but it seems sketchy since all the code I use to test locally is actually different from what gets ran in live environments. Is there a better way?
Was this page helpful?