diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 481fec11..7b883ad0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -43,5 +43,5 @@ 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: "/docs" # App source code path - api_location: "api" # Api source code path - optional + api_location: "/docs/api" # Api source code path - optional output_location: "build" # Built app content directory - optional diff --git a/docs/api/.funcignore b/docs/api/.funcignore new file mode 100644 index 00000000..51792224 --- /dev/null +++ b/docs/api/.funcignore @@ -0,0 +1,7 @@ +*.js.map +*.ts +.git* +.vscode +local.settings.json +test +tsconfig.json \ No newline at end of file diff --git a/docs/api/.gitignore b/docs/api/.gitignore new file mode 100644 index 00000000..01774db7 --- /dev/null +++ b/docs/api/.gitignore @@ -0,0 +1,99 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TypeScript output +dist +out + +# Azure Functions artifacts +bin +obj +appsettings.json +local.settings.json + +# Azurite artifacts +__blobstorage__ +__queuestorage__ +__azurite_db*__.json \ No newline at end of file diff --git a/docs/api/auth/function.json b/docs/api/auth/function.json new file mode 100644 index 00000000..7eb1f8f2 --- /dev/null +++ b/docs/api/auth/function.json @@ -0,0 +1,19 @@ +{ + "bindings": [ + { + "authLevel": "anonymous", + "type": "httpTrigger", + "direction": "in", + "name": "req", + "methods": [ + "get", + "post" + ] + }, + { + "type": "http", + "direction": "out", + "name": "res" + } + ] +} diff --git a/docs/api/auth/index.js b/docs/api/auth/index.js new file mode 100644 index 00000000..640e45dc --- /dev/null +++ b/docs/api/auth/index.js @@ -0,0 +1,13 @@ +module.exports = async function (context, req) { + context.log('JavaScript HTTP trigger function processed a request.'); + + const name = (req.query.name || (req.body && req.body.name)); + const responseMessage = name + ? "Hello, " + name + ". This HTTP triggered function executed successfully." + : "This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response."; + + context.res = { + // status: 200, /* Defaults to 200 */ + body: responseMessage + }; +} diff --git a/docs/api/auth/sample.dat b/docs/api/auth/sample.dat new file mode 100644 index 00000000..26aac46f --- /dev/null +++ b/docs/api/auth/sample.dat @@ -0,0 +1,3 @@ +{ + "name": "Azure" +} \ No newline at end of file diff --git a/docs/api/host.json b/docs/api/host.json new file mode 100644 index 00000000..3f33af10 --- /dev/null +++ b/docs/api/host.json @@ -0,0 +1,15 @@ +{ + "version": "2.0", + "logging": { + "applicationInsights": { + "samplingSettings": { + "isEnabled": true, + "excludedTypes": "Request" + } + } + }, + "extensionBundle": { + "id": "Microsoft.Azure.Functions.ExtensionBundle", + "version": "[2.*, 3.0.0)" + } +} diff --git a/docs/api/local.settings.json b/docs/api/local.settings.json new file mode 100644 index 00000000..4e3da2cc --- /dev/null +++ b/docs/api/local.settings.json @@ -0,0 +1,7 @@ +{ + "IsEncrypted": false, + "Values": { + "AzureWebJobsStorage": "", + "FUNCTIONS_WORKER_RUNTIME": "node" + } +} diff --git a/docs/api/package.json b/docs/api/package.json new file mode 100644 index 00000000..10f08eed --- /dev/null +++ b/docs/api/package.json @@ -0,0 +1,11 @@ +{ + "name": "api", + "version": "1.0.0", + "description": "", + "scripts": { + "start": "func start", + "test": "echo \"No tests yet...\"" + }, + "dependencies": {}, + "devDependencies": {} +}