This repository has been archived by the owner on Feb 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of github.com:rropen/SFM into dev
- Loading branch information
Showing
21 changed files
with
339 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["ms-azuretools.vscode-azurefunctions"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Attach to Node Functions", | ||
"type": "node", | ||
"request": "attach", | ||
"port": 9229, | ||
"preLaunchTask": "func: host start" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true | ||
} | ||
}, | ||
"azureFunctions.deploySubpath": "src/serverlessBackend", | ||
"azureFunctions.postDeployTask": "npm install (functions)", | ||
"azureFunctions.projectLanguage": "TypeScript", | ||
"azureFunctions.projectRuntime": "~4", | ||
"debug.internalConsoleOptions": "neverOpen", | ||
"azureFunctions.projectSubpath": "src/serverlessBackend", | ||
"azureFunctions.preDeployTask": "npm prune (functions)" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "func", | ||
"command": "host start", | ||
"problemMatcher": "$func-node-watch", | ||
"isBackground": true, | ||
"dependsOn": "npm build (functions)", | ||
"options": { | ||
"cwd": "${workspaceFolder}/src/serverlessBackend" | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "npm build (functions)", | ||
"command": "npm run build", | ||
"dependsOn": "npm install (functions)", | ||
"problemMatcher": "$tsc", | ||
"options": { | ||
"cwd": "${workspaceFolder}/src/serverlessBackend" | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "npm install (functions)", | ||
"command": "npm install", | ||
"options": { | ||
"cwd": "${workspaceFolder}/src/serverlessBackend" | ||
} | ||
}, | ||
{ | ||
"type": "shell", | ||
"label": "npm prune (functions)", | ||
"command": "npm prune --production", | ||
"dependsOn": "npm build (functions)", | ||
"problemMatcher": [], | ||
"options": { | ||
"cwd": "${workspaceFolder}/src/serverlessBackend" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,7 +174,7 @@ docker-compose -f docker-compose.yml -f local-docker-compose.yml up -d backend | |
docker-compose -f docker-compose.yml -f local-docker-compose.yml -p sfm exec backend alembic upgrade head | ||
``` | ||
|
||
You can visit the backend by opening a browser to the address <http://localhost:8181>. You can open a gui to see data in your running postgres database by visiting <http://localhost:8182>. Login with the username `[email protected]` and the password `root`. | ||
You can visit the backend by opening a browser to the address <http://localhost:8181/docs>. You can open a gui to see data in your running postgres database by visiting <http://localhost:8182>. Login with the username `[email protected]` and the password `root`. | ||
|
||
<!-- | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ services: | |
- 8181:8181 | ||
volumes: | ||
- ./backend/:/app | ||
env_file: | ||
- ./backend/.env | ||
|
||
frontend: | ||
depends_on: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"bindings": [ | ||
{ | ||
"authLevel": "function", | ||
"type": "httpTrigger", | ||
"direction": "in", | ||
"name": "req", | ||
"methods": ["get"] | ||
}, | ||
{ | ||
"type": "http", | ||
"direction": "out", | ||
"name": "res" | ||
} | ||
], | ||
"scriptFile": "../dist/deployments/index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { AzureFunction, Context, HttpRequest } from "@azure/functions"; | ||
|
||
const httpTrigger: AzureFunction = async function ( | ||
context: Context, | ||
req: HttpRequest | ||
): Promise<void> { | ||
context.log("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, | ||
}; | ||
}; | ||
|
||
export default httpTrigger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"name": "Azure" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "sfm-serverlessbackend", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"description": "", | ||
"scripts": { | ||
"build": "tsc", | ||
"watch": "tsc -w", | ||
"prestart": "npm run build", | ||
"start": "func start", | ||
"test": "echo \"No tests yet...\"" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@azure/functions": "^1.2.3", | ||
"typescript": "^4.0.0" | ||
} | ||
} |
Oops, something went wrong.