forked from bro-students/multy-stub
add version to root
This commit is contained in:
parent
954938d6a9
commit
db1cbf6554
@ -1,13 +1,14 @@
|
|||||||
const router = require('express').Router()
|
const router = require('express').Router()
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
const pkg = require('../package.json')
|
||||||
|
|
||||||
const folderPath = path.resolve(__dirname, './routers')
|
const folderPath = path.resolve(__dirname, './routers')
|
||||||
const folders = fs.readdirSync(folderPath)
|
const folders = fs.readdirSync(folderPath)
|
||||||
|
|
||||||
router.get('/', (req, res) => {
|
router.get('/', (req, res) => {
|
||||||
res.send(`
|
res.send(`
|
||||||
<h1>multy stub is working</h1>
|
<h1>multy stub is working v${pkg.version}</h1>
|
||||||
<ul>
|
<ul>
|
||||||
${folders.map((f) => `<li>${f}</li>`).join('')}
|
${folders.map((f) => `<li>${f}</li>`).join('')}
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user