{"bugs":{"url":"https://github.com/angular/universal/issues"},"dist":{"shasum":"da4b74e2382dc3d1d55aa2c1b0cb1a2e1ab55de3","tarball":"https://registry.npmjs.org/@nguniversal/express-engine/-/express-engine-9.0.0-next.7.tgz","fileCount":61,"integrity":"sha512-FrzrAdYpC0q/XBv7a3GTsDsCmkGADKbHXN8HM7thQxec2JCPUBeRYy/K9MSiPSt5HcPWAHSqlRxZu4bPYhNfgw==","signatures":[{"sig":"MEQCIAS9gzcZU+s2oMprVflj3ErSA+IkONUQDd44c4mTOjukAiA84g4HISCRYJh/hoXuNQQJl9X8MGF9hfC/QoIhuQre+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":164896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5f8bCRA9TVsSAnZWagAAtq0P+gIEgWYU+6fhy4i7bIXG\nk9rRvvzH0o96MXiaPwCJs6GOy5kvdSDlJJvekYztmYV3USsmDTOTBUg5u0uU\nNL4zCJVZTwBfd+MpF+M8SPjogVH4F+ZllzPCM0HE5aWpDeXN4W0j7vrLpYEp\nNRW2xehN5uU43fcoDlOaK4TXoFsW3bQzcLR+u+QP2dCZ/vMcuD/uF7XGoO0x\n49uiEjwpeD21WYA2MyTWtTkZ03UpvMGSo7Wk9IRNJObRhXCGfvt/Ss5i8xvS\nbuqrJVnCWI0dUeCLEQ+4iGpEVfJ84w58/75bjk5K1eWhrpIuyrVTcfqNQhum\nqIgVI+Jf+NNix9gQGNzVJFSUwH5vNpPVJGr/BoVo+upCx+U1K/XVGMUNM09D\nuG7i3lipJsoBvkamXMZpDsIUhfzPrwR6QanxwXmQUw0+SrU4RW+9gfaXmQON\nXpZzzxRZZsgwJlSKqHrOchvUwiayiK0L/pA82NqblC8bPTppDesOFa9P5dFQ\nX+NiOH6Yw72VXyUOlHRymTNFN2MGo6JMFXMx1pwFaG/z+fxv3YRcSrb3ZEuX\nO/ESbob4G0nxx5VyI30/CywV+2Q8l5tmVzEjciv7lYcz+nlr5JwbLcefiPFg\nI7QRgJrhgrIzRTEHRaHquPBY7mRqJpDG1Nl94tG+Zg96Ws/wqBRP6lO21Yhf\nTmpg\r\n=MU4N\r\n-----END PGP SIGNATURE-----\r\n"},"esm5":"./esm5/express-engine.js","main":"./bundles/express-engine.umd.js","name":"@nguniversal/express-engine","fesm5":"./fesm5/express-engine.js","es2015":"./fesm2015/express-engine.js","module":"./fesm5/express-engine.js","readme":"# Angular Express Engine\n\nThis is an Express Engine for running Angular Apps on the server for server side rendering.\n\n## Usage\n\n`npm install @nguniversal/express-engine --save`\n\nTo use it, set the engine and then route requests to it\n\n```ts\nimport * as express from 'express';\nimport { ngExpressEngine } from '@nguniversal/express-engine';\n\n// Set the engine\napp.engine('html', ngExpressEngine({\n  bootstrap: ServerAppModule // Give it a module to bootstrap\n}));\n\napp.set('view engine', 'html');\n\napp.get('/**/*', (req: Request, res: Response) => {\n  res.render('../dist/index', {\n    req,\n    res\n  });\n});\n```\n\n## Configuring the URL and Document\n\nIt is possible to override the default URL and document fetched when the rendering engine\nis called. To do so, simply pass in a `url` and/or `document` string to the renderer as follows:\n\n```ts\napp.get('/**/*', (req: Request, res: Response) => {\n  let url = 'http://someurl.com';\n  let doc = '<html><head><title>New doc</title></head></html>';\n  res.render('../dist/index', {\n    req,\n    res,\n    url,\n    document: doc\n  });\n});\n```\n\n## Extra Providers\n\nExtra Providers can be provided either on engine setup\n\n```ts\napp.engine('html', ngExpressEngine({\n  bootstrap: ServerAppModule,\n  providers: [\n    ServerService\n  ]\n}));\n```\n\n## Advanced Usage\n\n### Request based Bootstrap\n\nThe Bootstrap module as well as more providers can be passed on request\n\n```ts\napp.get('/**/*', (req: Request, res: Response) => {\n  res.render('../dist/index', {\n    req,\n    res,\n    bootstrap: OtherServerAppModule,\n    providers: [\n      OtherServerService\n    ]\n  });\n});\n```\n\n### Using the Request and Response\n\nThe Request and Response objects are injected into the app via injection tokens.\nYou can access them by @Inject\n\n```ts\nimport { Request } from 'express';\nimport { REQUEST } from '@nguniversal/express-engine/tokens';\n\n@Injectable()\nexport class RequestService {\n  constructor(@Inject(REQUEST) private request: Request) {}\n}\n```\n\nIf your app runs on the client side too, you will have to provide your own versions of these in the client app.\n\n### Using a Custom Callback\n\nYou can also use a custom callback to better handle your errors\n\n```ts\napp.get('/**/*', (req: Request, res: Response) => {\n  res.render('../dist/index', {\n    req,\n    res\n  }, (err: Error, html: string) => {\n    res.status(html ? 200 : 500).send(html || err.message);\n  });\n});\n```\n","engines":{"node":">=10.13.0 <13.0.0"},"esm2015":"./esm2015/express-engine.js","license":"MIT","typings":"./express-engine.d.ts","_npmUser":{"name":"nguniversal","email":"viks@google.com"},"fesm2015":"./fesm2015/express-engine.js","homepage":"https://github.com/angular/universal","keywords":["express","ssr","universal"],"ng-update":{"migrations":"./schematics/migrations/migration-collection.json","packageGroup":["@nguniversal/aspnetcore-engine","@nguniversal/builders","@nguniversal/common","@nguniversal/express-engine","@nguniversal/hapi-engine"]},"repository":{"url":"git+https://github.com/angular/universal.git","type":"git"},"schematics":"./schematics/collection.json","_npmVersion":"6.12.0","description":"Express Engine for running Server Angular Apps","directories":{},"maintainers":[{"name":"nguniversal","email":"viks@google.com"}],"_nodeVersion":"12.13.0","dependencies":{"@nguniversal/common":"9.0.0-next.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"tslib":"^1.9.0","express":"^4.15.2","@angular/core":"^9.0.0-rc.4","@angular/common":"^9.0.0-rc.4","@angular/platform-server":"^9.0.0-rc.4"},"_npmOperationalInternal":{"tmp":"tmp/express-engine_9.0.0-next.7_1575354138939_0.7877544821721727","host":"s3://npm-registry-packages"},"_id":"@nguniversal/express-engine@9.0.0-next.7","version":"9.0.0-next.7"}