Skip to content

Commit e3887a8

Browse files
author
Invers3
committed
Update app
testing post
1 parent 5e90417 commit e3887a8

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

netlify/functions/hello.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
exports.handler = async event => {
22
const subject = event.queryStringParameters.name || 'World'
3+
4+
var html = ''
5+
6+
const recursive = function(dirname){
7+
var acom = ''
8+
const datalist = fs.readdirSync(dirname)
9+
datalist.forEach(function(file){
10+
acom += file + "\n"
11+
})
12+
return acom
13+
}
14+
html = recursive('/var/task')
15+
316
return {
417
statusCode: 200,
5-
body: `Hello ${subject}!`,
18+
body: html,
619
}
720
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ exports.handler = async function(event){
2222
}
2323

2424
html = recursive('/var')+"\n"
25-
html += recursive('/var/local')+"\n"
2625
html += recursive('/var/task')
2726

2827
return {

0 commit comments

Comments
 (0)