Created
May 14, 2022 11:03
-
-
Save Saad-ISAA/437084bea5b2386f9089d6dada0b6945 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
'use strict'; | |
const { connect } = require('./helper/mongo'); | |
module.exports = { | |
/** | |
* An asynchronous register function that runs before | |
* your application is initialized. | |
* | |
* This gives you an opportunity to extend code. | |
*/ | |
// eslint-disable-next-line @typescript-eslint/no-empty-function | |
register(/*{ strapi }*/) { }, | |
/** | |
* An asynchronous bootstrap function that runs before | |
* your application gets started. | |
* | |
* This gives you an opportunity to set up your data model, | |
* run jobs, or perform some special logic. | |
*/ | |
async bootstrap({ strapi }) { | |
strapi.mongodb = await connect(); | |
console.log('MongoDB connected', strapi.mongodb.databaseName); | |
}); | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment