Created
September 5, 2020 15:29
-
-
Save karthiks/29cd5cf968b742c7ccd8fddef54111d7 to your computer and use it in GitHub Desktop.
The elegant but unworkable configuration in Strapi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = ({ env }) => ({ | |
defaultConnection: 'default', | |
connections: { | |
default: { | |
connector: 'mongoose', | |
settings: { | |
host: env('DATABASE_HOST', 'cluster0.hp5fc.mongodb.net'), // Your MongoDB Atlas Cluster Service DNS | |
srv: env.bool('DATABASE_SRV', true), | |
port: env.int('DATABASE_PORT', 27017), | |
database: env('DATABASE_NAME', 'cmsdb'), | |
username: env('DATABASE_USERNAME', 'YourMongoDBAtlasAdminUser'), | |
password: env('DATABASE_PASSWORD', 'YourMongoDBAtlasAdminPassword'), | |
}, | |
options: { | |
authenticationDatabase: env('AUTHENTICATION_DATABASE', null), | |
ssl: env.bool('DATABASE_SSL', true), | |
}, | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment