Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new admin Azure Functions app and migrate Functions over #112

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
5 changes: 0 additions & 5 deletions .vscode/extensions.json

This file was deleted.

12 changes: 0 additions & 12 deletions .vscode/launch.json

This file was deleted.

7 changes: 0 additions & 7 deletions .vscode/settings.json

This file was deleted.

98 changes: 0 additions & 98 deletions .vscode/tasks.json

This file was deleted.

28 changes: 28 additions & 0 deletions alp.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"folders": [
{
"path": "aunt-leahs-functions"
},
{
"path": "aunt-leahs-functions-admin"
},
{
"path": "aunt-leahs-app"
}
],
"settings": {
"debug.internalConsoleOptions": "neverOpen"
},
"launch": {
"configurations": [],
"compounds": [
{
"name": "Attach to both function apps",
"configurations": [
"Attach to app1",
"Attach to app2"
]
}
]
}
}
7 changes: 7 additions & 0 deletions aunt-leahs-functions-admin/.funcignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.js.map
*.ts
.git*
.vscode
local.settings.json
test
tsconfig.json
94 changes: 94 additions & 0 deletions aunt-leahs-functions-admin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# 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
5 changes: 5 additions & 0 deletions aunt-leahs-functions-admin/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"ms-azuretools.vscode-azurefunctions"
]
}
13 changes: 13 additions & 0 deletions aunt-leahs-functions-admin/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to app2",
"type": "node",
"request": "attach",
"port": 9228,
"preLaunchTask": "func: host start --port 7072"
}
]
}

11 changes: 11 additions & 0 deletions aunt-leahs-functions-admin/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"azureFunctions.projectRuntime": "~2",
"azureFunctions.projectLanguage": "JavaScript",
"azureFunctions.deploySubpath": ".",
"azureFunctions.preDeployTask": "func: extensions install",
"files.exclude": {
"obj": true,
"bin": true
},
"debug.internalConsoleOptions": "neverOpen"
}
12 changes: 12 additions & 0 deletions aunt-leahs-functions-admin/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "func",
"command": "host start --port 7072",
"problemMatcher": "$func-watch",
"dependsOn": "func: extensions install",
"isBackground": true
}
]
}
16 changes: 16 additions & 0 deletions aunt-leahs-functions-admin/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var config = {
server: process.env["sqldb_server"],
options: {
encrypt: true,
database: process.env["sqldb_database"]
},
authentication: {
type: 'default',
options: {
userName: process.env["sqldb_username"],
password: process.env["sqldb_password"]
}
}
}

module.exports = config;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [ "get", "put" ],
"methods": [
"get",
"put"
],
"route": "history"
},
{
Expand All @@ -14,4 +17,4 @@
"name": "res"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,3 @@ module.exports = function (context, req) {
connection.execSql(request);
}
};

7 changes: 7 additions & 0 deletions aunt-leahs-functions-admin/host.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
}
}
19 changes: 19 additions & 0 deletions aunt-leahs-functions-admin/location/function.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"bindings": [
{
"authLevel": "function",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"post",
"put"
]
},
{
"type": "http",
"direction": "out",
"name": "res"
}
]
}
Loading