nestjs / serve-static

Serve static websites (SPA's) using Nest framework (node.js) 🥦

Home Page:https://nestjs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing 'prefix' property in ServeStaticOptions

cerireyhan opened this issue · comments

commented

ServeStaticOptions interface defined in @nestjs/platform-express has an extra property 'prefix' which is missing from the same interface defined in this package. Having the option within this module would be great and shouldn't we define the interface once unless there is a special reason for having a duplicate in this package as well?

This package tends to solve a slightly different issue, as stated in the README file:

@nestjs/serve-static package for 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) instead.

For this use-case, adding prefix does not make sense.