{"bugs":{"url":"https://github.com/angular/universal/issues"},"dist":{"shasum":"3750bf902109b4f21d473941011261c30a03a44f","tarball":"https://registry.npmjs.org/@nguniversal/express-engine/-/express-engine-9.0.0-next.2.tgz","fileCount":58,"integrity":"sha512-zh3zXIT0IGf+rNwJguqAcVUl9iLBS80WdQvh+dnlVzSyON4R5hSOl5f39/m524maKcLySqlu4n21gOSVS/yRBQ==","signatures":[{"sig":"MEYCIQCl5+BxtvY20J39CUZkrOoS/SEtkt3ulIGj1/Cjd0FgpgIhALAypiurdsI9DZrJLwYu8Yi+v6IcWcM89f+Acdm6TMuh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":158355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdiooFCRA9TVsSAnZWagAAhfsP/2ihLM1Saj2QbO/7yqN4\nrwx74QOBvcN4Ahs1/9Iz34tE1ZHaC3ahnJJuG8NZ4k5s7IjYWpxsIE1bQ2yg\noBJ8SXYxraWu98J8jM0opsGWuh9Px/9LbYz9eI6/RDDR3ctwd7xzWBN4Uku1\nHgLbVaDtN6/TFJJOci7fBiHmrRB/IcW89vmJ6loI9hoiJayvpXibD9QJ12Hn\nsBdIakFjOlEbdPhyXF5nZPOd/NZtQiFMewHUrPUNuToUDnKhN6XJY4ncmF+5\nfOTVkYK9+QmOi2ysDv/EfCiB1honXtf5qMmdWJLDXssaJLIfmzqar1uhMld6\nbJLLoFITo7+q3vAt/R/LnxHxFEKih/a4xaX2P3B7P8/9shUFIfOMUV39/Y1s\nQlVzFGUKnlPI+kBWhRWwOv/+JYfn5SovnkGCfiANr6VhmKO/xcTMSbRCVJtm\nczW19Z+qez3iRbAQKnozdYF1rV5fyoqchhAm9QZG/DIFlwpaDw76XuulS8Yp\nnNSktP0UiSkg/om9IMNe8w5DSVCNLd+kmZz7EezOCQ9n+5azeEBdVWVEHT66\ncrcGgCsLBhk8nLmcMshUCnvJiveXxZ8wZi6j+rHCpgFx9vMcqteYAfdd1aSN\nSr2F/VWrJeQEVHiudYNBykRRJRyknMct4TZiXQgqdHSqzrZiyHSz14G2h/Sz\nZBWG\r\n=pFQC\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","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":{"packageGroup":["@nguniversal/aspnetcore-engine","@nguniversal/common","@nguniversal/express-engine","@nguniversal/hapi-engine","@nguniversal/module-map-ngfactory-loader"]},"repository":{"url":"git+https://github.com/angular/universal.git","type":"git"},"schematics":"./schematics/collection.json","_npmVersion":"6.9.0","description":"Express Engine for running Server Angular Apps","directories":{},"maintainers":[{"name":"nguniversal","email":"viks@google.com"}],"_nodeVersion":"10.16.0","dependencies":{"@nguniversal/common":"v9.0.0-next.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"express":"^4.15.2","@angular/core":"^9.0.0-next.5","@angular/common":"^9.0.0-next.5","@angular/platform-server":"^9.0.0-next.5"},"_npmOperationalInternal":{"tmp":"tmp/express-engine_9.0.0-next.2_1569360388883_0.7623526782960552","host":"s3://npm-registry-packages"},"_id":"@nguniversal/express-engine@9.0.0-next.2","version":"9.0.0-next.2"}