Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feat: TT-358 Use serverless to create Azure endpoint
  • Loading branch information
Andrés Soto committed Oct 14, 2021
commit d9ab6a4df7f63037852b6b5e110e500f0b2a8cae
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ htmlcov/
# virtual environments
.venv

# Dependency directories
node_modules
.serverless

# Files generated for development
.env
timetracker-api-postman-collection.json
Expand Down
5 changes: 0 additions & 5 deletions V2/azure_time_tracker/.funcignore

This file was deleted.

130 changes: 0 additions & 130 deletions V2/azure_time_tracker/.gitignore

This file was deleted.

103 changes: 103 additions & 0 deletions V2/azure_time_tracker/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# 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
.python_packages/

# Python
__pycache__/

# Virtual Environments
env/
.env/
.venv/
3 changes: 3 additions & 0 deletions V2/azure_time_tracker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Azure Functions

Refer to [Serverless docs](https://serverless.com/framework/docs/providers/azure/guide/intro/) for more information.
18 changes: 0 additions & 18 deletions V2/azure_time_tracker/activities/function.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import json
import azure.functions as func


JSON_PATH = 'V2/azure_time_tracker/time_tracker/source/activities_data.json'


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
activities:
handler: azure_functions/activities/activities.main
events:
- http: true
x-azure-settings:
methods:
- GET
route: activities/{id:?}
authLevel: anonymous
14 changes: 1 addition & 13 deletions V2/azure_time_tracker/host.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
}
"version": "2.0"
}
1 change: 1 addition & 0 deletions V2/azure_time_tracker/local.settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"IsEncrypted":false,"Values":{"AzureWebJobsStorage":"UseDevelopmentStorage=true","FUNCTIONS_WORKER_RUNTIME":"python"}}
Loading