Skip to content

Commit 75b258b

Browse files
Andrés Sotodsgarcia8
authored andcommitted
feat: TT-358 Use serverless to create Azure endpoint
1 parent b501bf1 commit 75b258b

File tree

16 files changed

+6009
-177
lines changed

16 files changed

+6009
-177
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ htmlcov/
2323
# virtual environments
2424
.venv
2525

26+
# Dependency directories
27+
node_modules
28+
.serverless
29+
2630
# Files generated for development
2731
.env
2832
timetracker-api-postman-collection.json

V2/azure_time_tracker/.funcignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

V2/azure_time_tracker/.gitignore

Lines changed: 0 additions & 130 deletions
This file was deleted.

V2/azure_time_tracker/.npmignore

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
24+
# nyc test coverage
25+
.nyc_output
26+
27+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
28+
.grunt
29+
30+
# Bower dependency directory (https://bower.io/)
31+
bower_components
32+
33+
# node-waf configuration
34+
.lock-wscript
35+
36+
# Compiled binary addons (https://nodejs.org/api/addons.html)
37+
build/Release
38+
39+
# Dependency directories
40+
node_modules/
41+
jspm_packages/
42+
43+
# TypeScript v1 declaration files
44+
typings/
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional eslint cache
50+
.eslintcache
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# dotenv environment variables file
62+
.env
63+
.env.test
64+
65+
# parcel-bundler cache (https://parceljs.org/)
66+
.cache
67+
68+
# next.js build output
69+
.next
70+
71+
# nuxt.js build output
72+
.nuxt
73+
74+
# vuepress build output
75+
.vuepress/dist
76+
77+
# Serverless directories
78+
.serverless/
79+
80+
# FuseBox cache
81+
.fusebox/
82+
83+
# DynamoDB Local files
84+
.dynamodb/
85+
86+
# TypeScript output
87+
dist
88+
out
89+
90+
# Azure Functions artifacts
91+
bin
92+
obj
93+
appsettings.json
94+
local.settings.json
95+
.python_packages/
96+
97+
# Python
98+
__pycache__/
99+
100+
# Virtual Environments
101+
env/
102+
.env/
103+
.venv/

V2/azure_time_tracker/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Azure Functions
2+
3+
Refer to [Serverless docs](https://serverless.com/framework/docs/providers/azure/guide/intro/) for more information.

V2/azure_time_tracker/activities/function.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

V2/azure_time_tracker/activities/__init__.py renamed to V2/azure_time_tracker/azure_functions/activities/activities.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import json
77
import azure.functions as func
88

9-
109
JSON_PATH = 'V2/azure_time_tracker/time_tracker/source/activities_data.json'
1110

1211

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
activities:
2+
handler: azure_functions/activities/activities.main
3+
events:
4+
- http: true
5+
x-azure-settings:
6+
methods:
7+
- GET
8+
route: activities/{id:?}
9+
authLevel: anonymous

V2/azure_time_tracker/host.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
11
{
2-
"version": "2.0",
3-
"logging": {
4-
"applicationInsights": {
5-
"samplingSettings": {
6-
"isEnabled": true,
7-
"excludedTypes": "Request"
8-
}
9-
}
10-
},
11-
"extensionBundle": {
12-
"id": "Microsoft.Azure.Functions.ExtensionBundle",
13-
"version": "[2.*, 3.0.0)"
14-
}
2+
"version": "2.0"
153
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"IsEncrypted":false,"Values":{"AzureWebJobsStorage":"UseDevelopmentStorage=true","FUNCTIONS_WORKER_RUNTIME":"python"}}

0 commit comments

Comments
 (0)