Add new databases
Add new databases
Add new database
[
{
name: 'your_first_database_connection',
// Models associated to a connection should be in a dedicated folder.
// If your setup already works, you'll need to update the modelsDir associated to your existing connection
// by changing this variable value
modelsDir: path.resolve(
__dirname,
'./models/your_first_database_connection'
),
connection: {
url: process.env.DATABASE_URL,
options: {
/* Database options can be empty, but should match with your requirements */
},
},
},
{
name: 'name_of_the_connection',
modelsDir: path.resolve(__dirname, './models/name_of_the_connection'),
connection: {
url: process.env.ANOTHER_DB_URL,
options: {
/* Database options can be empty, but should match with your requirements */
},
},
},
];Last updated
Was this helpful?