Compare commits

..

No commits in common. "bbc315e2704f949812e0d1e56681abcfc91929fe" and "9d3edcf0ddde819890442c4c62c2b9098eef1f54" have entirely different histories.

View File

@ -10,23 +10,14 @@ const folderPath = path.resolve(__dirname, './routers')
const folders = fs.readdirSync(folderPath)
router.get('/', async (req, res) => {
res.send(`
res.send(`
<h1>multy stub is working v${pkg.version}</h1>
<ul>
${folders.map((f) => `<li>${f}</li>`).join('')}
</ul>
<h2>models</h2>
<ul>${
(await Promise.all(
(
await mongoose.modelNames()).map(async (name) => {
const count = await mongoose.model(name).countDocuments()
return `<li>${name} - ${count}</li>`
}
)
)).map(t => t).join(' ')
}</ul>
<ul>${(await mongoose.modelNames()).map((name) => `<li>${name}</li>`)}</ul>
`)
})