ngx-ssr 4.0.0-pr18.7
Install from the command line:
Learn more about npm packages
$ npm install @shiftcode/ngx-ssr@4.0.0-pr18.7
Install via package.json:
"@shiftcode/ngx-ssr": "4.0.0-pr18.7"
About this version
Services and helpers used for server side rendering.
Rewrites relative urls on ssr to ${ORIGIN}/${relativeUrl}
where Origin is the injected value from the ORIGIN token.
- when in Lambda: using the value from the provided ENV VAR (tris to read the
FINAL_DOMAINenv var if no other name provided). - when local:
${request.protocol}://${request.hostname}:${port}/${relativeUrl}- where port is the
x-forwarded-portheader value or the fallback value4000
- where port is the
- Make sure the configured environment Variable for the origin is set in your Lambda function.
import { ServerModule } from '@angular/platform-server'
import { provideOrigin, SsrHttpInterceptor } from '@shiftcode/ngx-ssr'
import { AppComponent } from './app.component'
import { AppModule } from './app.module'
@NgModule({
imports: [ServerModule, AppModule],
providers: [
provideOrigin({ envVarName: 'FINAL_DOMAIN' }),
{ provide: HTTP_INTERCEPTORS, useClass: SsrHttpInterceptor, multi: true },
],
bootstrap: [AppComponent],
})
export class AppServerModule {}-
@angular/core+@angular/commons @nguniversal/express-engineexpress-
@shiftcode/ngx-core(Logger)
Assets
- ngx-ssr-4.0.0-pr18.7.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0