File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,13 @@ import { render } from '@netlify/angular-runtime/common-engine'
16
16
const commonEngine = new CommonEngine()
17
17
18
18
export async function netlifyCommonEngineHandler(request: Request, context: any): Promise<Response> {
19
+ // Example API endpoints can be defined here.
20
+ // Uncomment and define endpoints as necessary.
21
+ // const pathname = new URL(request.url).pathname;
22
+ // if (pathname === '/api/hello') {
23
+ // return Response.json({ message: 'Hello from the API' });
24
+ // }
25
+
19
26
return await render(commonEngine)
20
27
}
21
28
`
@@ -29,6 +36,13 @@ const angularAppEngine = new AngularAppEngine()
29
36
export async function netlifyAppEngineHandler(request: Request): Promise<Response> {
30
37
const context = getContext()
31
38
39
+ // Example API endpoints can be defined here.
40
+ // Uncomment and define endpoints as necessary.
41
+ // const pathname = new URL(request.url).pathname;
42
+ // if (pathname === '/api/hello') {
43
+ // return Response.json({ message: 'Hello from the API' });
44
+ // }
45
+
32
46
const result = await angularAppEngine.handle(request, context)
33
47
return result || new Response('Not found', { status: 404 })
34
48
}
You can’t perform that action at this time.
0 commit comments