Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "angular-app" # App source code path
api_location: "api-starter" # Api source code path - optional
api_location: "api" # Api source code path - optional
output_location: "dist/angular-app" # Built app content directory - optional
###### End of Repository/Build Configurations ######

Expand Down
22 changes: 15 additions & 7 deletions angular-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions api/products-get/function.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"get"
],
"route": "products"
},
{
"type": "http",
"direction": "out",
"name": "res"
}
]
}
10 changes: 10 additions & 0 deletions api/products-get/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const data = require('../shared/product-data')

module.exports = async function (context, req) {
try {
const products = data.getProducts();
context.res.status(200).json(products);
} catch(error){
context.res.status(500).send(error);
}
}
3 changes: 3 additions & 0 deletions api/products-get/sample.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name": "Azure"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.