You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
varsample=require('./sample.json');module.exports=function(context,req){context.log('JavaScript HTTP trigger function processed a request.');if(req.query.name||(req.body&&req.body.name)){context.res={// status: 200, /* Defaults to 200 */body: "Hello "+(req.query.name||req.body.name)};}else{context.res={status: 400,body: "Please pass a name on the query string or in the request body"};}context.done();};
But when i try require a json file with a variables, the funcpack pack ./ command seems work well
but when i start az functions dont work well. Could you help me?
varfile='./sample.json';varsample=require(file);module.exports=function(context,req){context.log('JavaScript HTTP trigger function processed a request.');if(req.query.name||(req.body&&req.body.name)){context.res={// status: 200, /* Defaults to 200 */body: "Hello "+(req.query.name||req.body.name)};}else{context.res={status: 400,body: "Please pass a name on the query string or in the request body"};}context.done();};
Hi All,
I'm having problem with a dynamic require.
When i did it, work perfect
But when i try require a json file with a variables, the funcpack pack ./ command seems work well
but when i start az functions dont work well. Could you help me?
The text was updated successfully, but these errors were encountered: