File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 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'
1616const commonEngine = new CommonEngine()
1717
1818export 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+
1926 return await render(commonEngine)
2027}
2128`
@@ -29,6 +36,13 @@ const angularAppEngine = new AngularAppEngine()
2936export async function netlifyAppEngineHandler(request: Request): Promise<Response> {
3037 const context = getContext()
3138
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+
3246 const result = await angularAppEngine.handle(request, context)
3347 return result || new Response('Not found', { status: 404 })
3448}
You can’t perform that action at this time.
0 commit comments