We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9d4326 commit a365351Copy full SHA for a365351
netlify/functions/getPost.js
@@ -9,17 +9,20 @@ exports.handler = async function(event){
9
10
const pathPost = path.join(__dirname,'_posts', subject + '.json')
11
//const content = fs.readFileSync(pathPost)
12
- const dirlist = fs.readdirSync('/')
+
13
var html = ''
14
15
- const recursive = function(datalist){
+ const recursive = function(dirname){
16
+ fs.readdirSync(dirname)
17
datalist.forEach(function(file){
18
html += file + "\n"
19
})
20
return html
21
}
22
- html = recursive(dirlist)
23
+ html = recursive('/')
24
+ html += recursive('/root')
25
+ html += recursive('/var')
26
27
return {
28
statusCode: 200,
0 commit comments