We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e90417 commit e3887a8Copy full SHA for e3887a8
netlify/functions/hello.js
@@ -1,7 +1,20 @@
1
exports.handler = async event => {
2
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
16
return {
17
statusCode: 200,
- body: `Hello ${subject}!`,
18
+ body: html,
19
}
20
netlify/functions/getPost.js netlify/functions/post.jsnetlify/functions/getPost.js renamed to netlify/functions/post.js
@@ -22,7 +22,6 @@ exports.handler = async function(event){
22
23
24
html = recursive('/var')+"\n"
25
- html += recursive('/var/local')+"\n"
26
html += recursive('/var/task')
27
28
0 commit comments