{"bugs":{"url":"https://github.com/angular/universal/issues"},"dist":{"shasum":"06b768ebc178b01e2404e498908dbd3cb2361dfe","tarball":"https://registry.npmjs.org/@nguniversal/express-engine/-/express-engine-11.0.0-next.2.tgz","fileCount":44,"integrity":"sha512-9x/qc0Gzua8lKdAkVTt5b0lN/k6X+QsqT9/3zGiO4XJlBOnAi534b9XlGvSOhkrdItiCEv1rwmbIeGH8L1QRRw==","signatures":[{"sig":"MEUCIDq8gkVGl3SbzeFogn2aYIokNycQ3mQwomiAYdj9kOopAiEA3UXWDEp5BeaejxIs20qt/TmORrcJ/uAvnKZMYi5pzpY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":128283,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpMyyCRA9TVsSAnZWagAASUsQAKEsZ+UP+SPO5q7WREt3\nMGxQMqdsA+xqF4SusGHx0pL0kgy0ltAUdFbY6EliPXPxo0Drff70+jhkrguc\nYcAHCBzXXKa+REj/xJ15yY4zUzLVbHvBcKIXgedaXiY9J2lJs3IW2HxeqYPe\nJoTKtVC1Ui13E9pBAahMNXEyqoTbUOWVuu6iczSh0Xj/ryEKUpwbiJP12LAi\n8LPk2OLb3kpMKE78wNQbFQ36F4EZNUDF/Vkv1Jouqcu6aVUn5PCHhOj0BSKH\nQN7f0OYPiOKMGpIRAszfK2KmGyGwUgjWeK4lyVJ3eMzkYZPqqQtFb6bEZSPI\n+NxOJiXuP3wtjNBCq5nKJqJ/pphqwTaXJwRc7w4cluKsTHJNq1IkDi2tfifw\nLOcEzeG3RTaxe9YJmJvLp/M7QPLEH3Z7tyDMz2IoRODpty33YpG8GQxuvrb4\n6uv6Fj0E3VX/eK03+hTA2i51X62iuk5L0o8m8olhLaj7TO5tIqHTpT1qSqIU\nOpEcXbt2VEjMLBrJQ52QTLvYyWvw/NhF9ShGStu59e0amxAz0eJDbi7T/9+G\nJHFP33ESmDtjAFh3WW+rcw0jK5AOvQ/XgxWBeUI1I8Mf6JJ7+F6t3ShQAXbp\n9ZnVZq1yKpgA6duEjSk4Wr7FmI4gzGi5WiIk0kAUuegLfV9wgYCM+jYt4U7o\nt3aD\r\n=CpII\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./bundles/express-engine.umd.js","name":"@nguniversal/express-engine","es2015":"./fesm2015/express-engine.js","module":"./fesm2015/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\nconst app = express();\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"},"esm2015":"./esm2015/express-engine.js","license":"MIT","typings":"./express-engine.d.ts","_npmUser":{"name":"angular","email":"devops+npm@angular.io"},"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"],"packageGroupName":"@nguniversal/express-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":"angular","email":"devops+npm@angular.io"},{"name":"nguniversal","email":"viks@google.com"},{"name":"google-wombot","email":"node-team-npm+wombot@google.com"}],"_nodeVersion":"12.13.0","dependencies":{"tslib":"^2.0.0","@nguniversal/common":"11.0.0-next.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"express":"^4.15.2","@angular/core":"^11.0.0-rc.2","@angular/common":"^11.0.0-rc.2","@angular/platform-server":"^11.0.0-rc.2"},"_npmOperationalInternal":{"tmp":"tmp/express-engine_11.0.0-next.2_1604635825918_0.03357614830620448","host":"s3://npm-registry-packages"},"_id":"@nguniversal/express-engine@11.0.0-next.2","version":"11.0.0-next.2"}