mirror of
https://github.com/intergalacticalvariable/reader.git
synced 2024-11-16 11:42:32 +08:00
feat: add hello world endpoint in firebase cloud functions
This commit is contained in:
parent
f927aab144
commit
b682ee5bb5
|
@ -1,7 +1,7 @@
|
|||
import 'reflect-metadata';
|
||||
import { initializeApp } from 'firebase-admin/app';
|
||||
import { CrawlerHost } from './cloud-functions/crawler';
|
||||
import { https } from 'firebase-functions';
|
||||
import { https, HttpsFunction } from 'firebase-functions';
|
||||
import { Logger } from './shared/logger';
|
||||
import { container } from 'tsyringe';
|
||||
import { PuppeteerControl } from './services/puppeteer';
|
||||
|
@ -22,6 +22,10 @@ const crawlerHost = container.resolve(CrawlerHost);
|
|||
export const crawler = https.onRequest(async (req, res) => {
|
||||
await crawlerHost.crawl(req, res);
|
||||
});
|
||||
|
||||
export const helloWorld: HttpsFunction = https.onRequest((req, res) => {
|
||||
res.send('Hello World!');
|
||||
});
|
||||
// import { loadModulesDynamically, registry } from './shared';
|
||||
// import path from 'path';
|
||||
// loadModulesDynamically(path.resolve(__dirname, 'cloud-functions'));
|
||||
|
|
Loading…
Reference in New Issue
Block a user