diff --git a/README.md b/README.md index 4f0059ed..320e3037 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ export async function netlifyCommonEngineHandler(request: Request, context: any) // Example API endpoints can be defined here. // Uncomment and define endpoints as necessary. // const pathname = new URL(request.url).pathname; - // if (pathname = '/api/hello') { + // if (pathname === '/api/hello') { // return Response.json({ message: 'Hello from the API' }); // } @@ -145,7 +145,7 @@ export async function netlifyAppEngineHandler(request: Request): Promise { + // Example API endpoints can be defined here. + // Uncomment and define endpoints as necessary. + // const pathname = new URL(request.url).pathname; + // if (pathname === '/api/hello') { + // return Response.json({ message: 'Hello from the API' }); + // } + return await render(commonEngine) } ` @@ -29,6 +36,13 @@ const angularAppEngine = new AngularAppEngine() export async function netlifyAppEngineHandler(request: Request): Promise { const context = getContext() + // Example API endpoints can be defined here. + // Uncomment and define endpoints as necessary. + // const pathname = new URL(request.url).pathname; + // if (pathname === '/api/hello') { + // return Response.json({ message: 'Hello from the API' }); + // } + const result = await angularAppEngine.handle(request, context) return result || new Response('Not found', { status: 404 }) } @@ -113,7 +127,7 @@ const fixServerTs = async function ({ angularVersion, siteRoot, failPlugin, fail ) } else if (!satisfies(angularRuntimeVersionInstalledByUser, '>=2.2.0', { includePrerelease: true })) { failBuild( - `Angular@19 SSR on Netlify requires '@netlify/angular-runtime' version 2.2.0 or later to be installed. Found version "${angularRuntimeVersionInstalledByUser}. Please update it to version 2.2.0 or later and try again.`, + `Angular@19 SSR on Netlify requires '@netlify/angular-runtime' version 2.2.0 or later to be installed. Found version "${angularRuntimeVersionInstalledByUser}". Please update it to version 2.2.0 or later and try again.`, ) }