Skip to content

Commit afe09f7

Browse files
committed
Add endpoint to read data from json file
0 parents  commit afe09f7

File tree

6 files changed

+73
-0
lines changed

6 files changed

+73
-0
lines changed

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
bin
2+
obj
3+
csx
4+
.vs
5+
edge
6+
Publish
7+
8+
*.user
9+
*.suo
10+
*.cscfg
11+
*.Cache
12+
project.lock.json
13+
14+
/packages
15+
/TestResults
16+
17+
/tools/NuGet.exe
18+
/App_Data
19+
/secrets
20+
/data
21+
/node_modules
22+
.secrets
23+
appsettings.json
24+
local.settings.json
25+
.vscode

GetRecipes/function.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"disabled": false,
3+
"bindings": [
4+
{
5+
"authLevel": "anonymous",
6+
"type": "httpTrigger",
7+
"direction": "in",
8+
"name": "req",
9+
"methods": ["get"]
10+
},
11+
{
12+
"type": "http",
13+
"direction": "out",
14+
"name": "res"
15+
},
16+
{
17+
"name": "data",
18+
"type": "blob",
19+
"direction": "in",
20+
"connection": "AzureWebJobsStorage",
21+
"path": "data/data.json"
22+
}
23+
]
24+
}

GetRecipes/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = async function(context, req) {
2+
context.log('JavaScript HTTP trigger function processed a request.');
3+
context.res = {
4+
body: context.bindings.data
5+
};
6+
};

extensions.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>netstandard2.0</TargetFramework>
4+
<WarningsAsErrors></WarningsAsErrors>
5+
<DefaultItemExcludes>**</DefaultItemExcludes>
6+
</PropertyGroup>
7+
<ItemGroup>
8+
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.0" />
9+
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.0.1" />
10+
</ItemGroup>
11+
</Project>

host.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"version": "2.0"
3+
}

proxies.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "http://json.schemastore.org/proxies",
3+
"proxies": {}
4+
}

0 commit comments

Comments
 (0)