Auth0 Home Blog Docs

local database in development

database
development
custom-database
localhost
local-databse

#1

How can I empower a local development flow with a custom database?

Say an engineer wanted to write (and test a migration)? Or create (and test) users through an app pointing at localhost servers? Obviously for one engineer you can run ngrok and update the database connection URL, but this will quite clearly not scale with engineering head count. Additionally, what if the database connection scripts need to updated and tested against a branch? How is local development empowered by Auth0?


#2

In terms of environment isolation the recommendation is always to have a separate Auth0 tenant/domain for development purposes. In that development environment, unless there really is an enormous amount of developers touching database connection scripts you could consider having a custom database connection per developer. This would ensure every developer would be isolated from the rest and you can even automate the process to update the database connection scripts through the Auth0 Management API in order to speed up the test of new changes or different branches.

As an alternative that does not involve going through the full process of configuring custom database connection you may want to check: https://github.com/tawawa/auth0-custom-db-testharness


#3