diff --git a/server/root.js b/server/root.js
index 519556f..fda15a7 100644
--- a/server/root.js
+++ b/server/root.js
@@ -10,14 +10,23 @@ const folderPath = path.resolve(__dirname, './routers')
const folders = fs.readdirSync(folderPath)
router.get('/', async (req, res) => {
- res.send(`
+ res.send(`
multy stub is working v${pkg.version}
${folders.map((f) => `- ${f}
`).join('')}
models
- ${(await mongoose.modelNames()).map((name) => `- ${name}
`)}
+ ${
+ (await Promise.all(
+ (
+ await mongoose.modelNames()).map(async (name) => {
+ const count = await mongoose.model(name).countDocuments()
+ return `- ${name} - ${count}
`
+ }
+ )
+ )).map(t => t).join(' ')
+ }
`)
})