Skip to content

Commit 79e2e78

Browse files
committed
added hello testing endpoint on voxxrin-api website
1 parent e157578 commit 79e2e78

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

cloud/firebase.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,30 @@
3333
},
3434
"singleProjectMode": true
3535
},
36-
"hosting": {
36+
"hosting": [{
3737
"site": "voxxrin-v3",
3838
"public": "hosting/public",
3939
"ignore": [
4040
"firebase.json",
4141
"**/.*",
4242
"**/node_modules/**"
4343
],
44+
"rewrites": [{
45+
"source": "!(/assets/**|/favicon.*|/sw.js|/manifest.webmanifest)",
46+
"destination": "/index.html"
47+
}]
48+
}, {
49+
"site": "voxxrin-v3-api",
4450
"rewrites": [
45-
{
46-
"source": "!(/assets/**|/favicon.*|/sw.js|/manifest.webmanifest)",
47-
"destination": "/index.html"
48-
}
51+
{ "source": "/api/**", "function": "api" },
52+
{ "source": "hello", "function": "hello" },
53+
{ "source": "crawl", "function": "crawl" },
54+
{ "source": "talkFeedbacksViewers", "function": "talkFeedbacksViewers" },
55+
{ "source": "attendeesFeedbacks", "function": "attendeesFeedbacks" },
56+
{ "source": "publicEventStats", "function": "publicEventStats" },
57+
{ "source": "eventStats", "function": "eventStats" },
58+
{ "source": "migrateFirestoreSchema", "function": "migrateFirestoreSchema" },
59+
{ "source": "globalStats", "function": "globalStats" }
4960
]
50-
}
61+
}]
5162
}

cloud/functions/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import * as express from 'express';
22
import * as functions from 'firebase-functions';
33
import {declareExpressHttpRoutes} from "./functions/http/api/routes";
4+
import {extractSingleQueryParam} from "./functions/http/utils";
45

56
const app = express()
67
app.use(express.json());
78

89
// Legacy HTTP Endpoints declaration... please use declareRoutes() instead !
10+
exports.hello = functions.https.onRequest(async (request, response) => {
11+
(await import("./functions/http/hello")).sayHello(response, {}, {who: extractSingleQueryParam(request, 'who') || "default"})
12+
})
913

1014
// For organizers
1115
// TODO: remove me once devoxx cfp will no longer use legacy URL

0 commit comments

Comments
 (0)