forked from bro-students/multy-stub
init from origin + update
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
const router = require('express').Router()
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const folderPath = path.resolve(__dirname, './routers')
|
||||
const folders = fs.readdirSync(folderPath)
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.send(`
|
||||
<h1>multy stub is working</h1>
|
||||
<ul>
|
||||
${folders.map((f) => `<li>${f}</li>`).join('')}
|
||||
</ul>
|
||||
`)
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
Reference in New Issue
Block a user