{"_id":"@7rulnik/nest-serve-static","_rev":"1-0907331610dd1b9c7282f4e40c57c611","name":"@7rulnik/nest-serve-static","dist-tags":{"latest":"2.2.3"},"versions":{"2.2.3":{"name":"@7rulnik/nest-serve-static","version":"2.2.3","description":"Nest - modern, fast, powerful node.js web framework (@serve-static)","author":{"name":"Valentin Semirulnik","email":"v7rulnik@gmail.com","url":"https://7rulnik.me/"},"license":"MIT","scripts":{"build":"npm run build:lib","build:lib":"tsc -p tsconfig.json","format":"prettier --write \"**/*.ts\"","lint":"eslint 'lib/**/*.ts' --fix","prepublish:npm":"npm run build","publish:npm":"npm publish --access public","prepublish:next":"npm run build","publish:next":"npm publish --access public --tag next","prerelease":"npm run build","release":"release-it"},"peerDependencies":{"@nestjs/common":"^6.0.0 || ^7.0.0 || ^8.0.0","@nestjs/core":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"@commitlint/cli":"13.1.0","@commitlint/config-angular":"13.1.0","@nestjs/common":"8.0.6","@nestjs/core":"8.0.6","@types/node":"16.0.0","@typescript-eslint/eslint-plugin":"4.31.0","@typescript-eslint/parser":"4.31.0","eslint":"7.32.0","eslint-config-prettier":"8.3.0","eslint-plugin-import":"2.24.2","reflect-metadata":"0.1.13","rxjs":"7.3.0","express":"4.17.1","fastify":"3.21.0","fastify-static":"4.2.3","husky":"7.0.2","lint-staged":"11.1.2","prettier":"2.3.2","release-it":"14.11.5","typescript":"4.4.2"},"lint-staged":{"*.ts":["prettier --write"]},"husky":{"hooks":{"commit-msg":"commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS","pre-commit":"lint-staged"}},"repository":{"type":"git","url":"git+https://github.com/7rulnik/serve-static.git"},"dependencies":{"path-to-regexp":"0.1.7"},"gitHead":"bdbb4b220b06c8c25916c86f7786d81de910777d","bugs":{"url":"https://github.com/7rulnik/serve-static/issues"},"homepage":"https://github.com/7rulnik/serve-static#readme","_id":"@7rulnik/nest-serve-static@2.2.3","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-XpxcugdehQe1Tc57O3WS84r4gwbIF590iDjLrgJ1M/uKqpa1bke2YagitHUwYxLueDAWd3h5MyQWA8CKQ1HtYg==","shasum":"92ed43f463daa5240cb6e8b30d02f97c6192f84e","tarball":"https://registry.npmjs.org/@7rulnik/nest-serve-static/-/nest-serve-static-2.2.3.tgz","fileCount":34,"unpackedSize":34290,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOfcnCRA9TVsSAnZWagAA4yIP/3QrM+pUWxVcLe7iXCJB\nmAN/J8790bZBXy/1cntjVKjmTjxecbts5k8kAF0TCAZlsDiFf/a0HseS4WxK\njoxqziJzO1biWqQLb2XCqmTQo6iyAxT1oH+BfdQWWNgojRv0gzru7OZvVc7D\nLAoZ1iHNCSJDQG1/grtWYfSL5RBbxghRDnZT30jPioEY2TXbViNgEPTeIDlP\nOMzwFA7UHceERtbaxa583AxU+1tMUaik7xmEoxybZdrjEszSZNvvVKgsFGxQ\n8BdcPbaqVWXxH9pCDpPFwCyb7viNZREXPzToGi21eVDz0S1xU4rV9SkpYvzo\nBl4f8xUkOloAOPIkkucypcojM6aB/f+dTH8R2euGR+bmjKm9688HMFWj7x+T\n1ptD11WNHsKjfQq64FopUFsaLtY9yBuZBGcqi9nNPZgx5WL1/6VtoBew+m3b\nGjG009RZK+dFOVn9cgKey2agRTtL2hRRYm5DsWsFDOa17HEGSCd5dXkfHV9X\nj7JpRA+vLGQ8jjzKkWqFXPc8ts3OPsYdIhQqGF8MfRdFUxgyPX0W8nK0Ze2d\nA7udnNVyssqPC6yjRmmHGJ7MD5haM32XtHJp44haBWEZ5wGIE9URHhgcLMyF\n7XFfUXctPinyWwVwRY0758rXx+CdkueMLRgsTEX5XuOMkfrqnf5lsIstlfDq\nybR7\r\n=MoO4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDl+X0G+BWjEWFZaHbZtdXjIUPSrz4/uM21EJ5aThiwCwIgDP2vzFOHF38VrBtf/F2ugyFAwV0a+Wf4iQcqMAJPknU="}]},"_npmUser":{"name":"7rulnik","email":"v7rulnik@gmail.com"},"directories":{},"maintainers":[{"name":"7rulnik","email":"v7rulnik@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-serve-static_2.2.3_1631188775632_0.8401425632365069"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-09T11:59:35.582Z","2.2.3":"2021-09-09T11:59:35.810Z","modified":"2022-04-04T10:49:28.245Z"},"maintainers":[{"name":"7rulnik","email":"v7rulnik@gmail.com"}],"description":"Nest - modern, fast, powerful node.js web framework (@serve-static)","homepage":"https://github.com/7rulnik/serve-static#readme","repository":{"type":"git","url":"git+https://github.com/7rulnik/serve-static.git"},"author":{"name":"Valentin Semirulnik","email":"v7rulnik@gmail.com","url":"https://7rulnik.me/"},"bugs":{"url":"https://github.com/7rulnik/serve-static/issues"},"license":"MIT","readme":"<p align=\"center\">\n  <a href=\"http://nestjs.com/\" target=\"blank\"><img src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /></a>\n</p>\n\n[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master\n[travis-url]: https://travis-ci.org/nestjs/nest\n[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux\n[linux-url]: https://travis-ci.org/nestjs/nest\n\n  <p align=\"center\">A progressive <a href=\"http://nodejs.org\" target=\"blank\">Node.js</a> framework for building efficient and scalable server-side applications.</p>\n    <p align=\"center\">\n<a href=\"https://www.npmjs.com/~nestjscore\"><img src=\"https://img.shields.io/npm/v/@nestjs/core.svg\" alt=\"NPM Version\" /></a>\n<a href=\"https://www.npmjs.com/~nestjscore\"><img src=\"https://img.shields.io/npm/l/@nestjs/core.svg\" alt=\"Package License\" /></a>\n<a href=\"https://www.npmjs.com/~nestjscore\"><img src=\"https://img.shields.io/npm/dm/@nestjs/core.svg\" alt=\"NPM Downloads\" /></a>\n<a href=\"https://travis-ci.org/nestjs/nest\"><img src=\"https://api.travis-ci.org/nestjs/nest.svg?branch=master\" alt=\"Travis\" /></a>\n<a href=\"https://travis-ci.org/nestjs/nest\"><img src=\"https://img.shields.io/travis/nestjs/nest/master.svg?label=linux\" alt=\"Linux\" /></a>\n<a href=\"https://coveralls.io/github/nestjs/nest?branch=master\"><img src=\"https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#5\" alt=\"Coverage\" /></a>\n<a href=\"https://discord.gg/G7Qnnhy\" target=\"_blank\"><img src=\"https://img.shields.io/badge/discord-online-brightgreen.svg\" alt=\"Discord\"/></a>\n<a href=\"https://opencollective.com/nest#backer\"><img src=\"https://opencollective.com/nest/backers/badge.svg\" alt=\"Backers on Open Collective\" /></a>\n<a href=\"https://opencollective.com/nest#sponsor\"><img src=\"https://opencollective.com/nest/sponsors/badge.svg\" alt=\"Sponsors on Open Collective\" /></a>\n  <a href=\"https://paypal.me/kamilmysliwiec\"><img src=\"https://img.shields.io/badge/Donate-PayPal-dc3d53.svg\"/></a>\n  <a href=\"https://twitter.com/nestframework\"><img src=\"https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow\"></a>\n</p>\n  <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)\n  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->\n\n## Description\n\n`@7rulnik/nest-serve-static` package for [Nest](https://github.com/nestjs/nest), useful to serve static content like Single Page Applications (SPA). However, if you are building MVC application or want to serve assets files (images, docs), use the `useStaticAssets()` method (read more [here](https://docs.nestjs.com/techniques/mvc)) instead.\n\n## Installation\n\n```bash\n$ npm i --save @7rulnik/nest-serve-static\n```\n\n## Example\n\nSee full example [here](https://github.com/nestjs/nest/tree/master/sample/24-serve-static).\n\n## Usage\n\nSimply import `ServeStaticModule` in your Nest application.\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { join } from 'path';\nimport { ServeStaticModule } from '@7rulnik/nest-serve-static';\n\n@Module({\n  imports: [\n    ServeStaticModule.forRoot({\n      rootPath: join(__dirname, '..', 'client')\n    })\n  ]\n})\nexport class ApplicationModule {}\n```\n\n## API Spec\n\nThe `forRoot()` method takes an options object with a few useful properties.\n\n| Property             | Type            | Description                                                                                                                                                                                          |\n| -------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `rootPath`           | string          | Static files root directory. Default: `\"client\"`                                                                                                                                                     |\n| `serveRoot`          | string          | Root path under which static app will be served. Default: `\"\"`                                                                                                                                       |\n| `renderPath`         | string / RegExp | Path to render static app (concatenated with the `serveRoot` value). Default: \\* (wildcard - all paths). Note: `RegExp` is not supported by the `@nestjs/platform-fastify`.                          |\n| `exclude`            | string[]        | Paths to exclude when serving the static app. WARNING! Not supported by `fastify`. If you use `fastify`, you can exclude routes using regexp (set the `renderPath` to a regular expression) instead. |\n| `serveStaticOptions` | Object          | Serve static options (static files)                                                                                                                                                                  |\n\n## Support\n\nNest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).\n\n## Stay in touch\n\n- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)\n- Website - [https://nestjs.com](https://nestjs.com/)\n- Twitter - [@nestframework](https://twitter.com/nestframework)\n\n## License\n\nNest is [MIT licensed](LICENSE).\n","readmeFilename":"README.md"}