Comments (3)
You use it just like the example for Helmet in README. Import ServeStaticMiddleware from the package, and you can call configure
to pass in your config, and then just use it like any other Nest middleware!
from nest-middlewares.
Closing due to no response. I'll add readmes soon
from nest-middlewares.
Sorry to reopen this, but I'm a bit lost here as well. As per the README, trying as follows in AppModule:
ServeStaticMiddleware.configure('public/');
consumer.apply(ServeStaticMiddleware).forRoutes('*');
Can't seem to find my public directory though.
Am I on the right track? Is forRoutes()
actually relevant in this case?
from nest-middlewares.
Related Issues (20)
- 如何使用它? HOT 1
- build fails with latest version of @nestjs/common HOT 6
- Examples / documentation HOT 2
- NestJs v6.0.0 HOT 1
- problem in the docs HOT 2
- Code bugs in CorsMiddleware HOT 2
- Support hide-powered-by HOT 4
- Cors exception + Readme CopyPaste bug HOT 5
- [express-session] Can't keep session values with default options. HOT 7
- @nest-middlewares/helmet using the next major version of Helmet HOT 1
- Morgan middleware fail to build on new project HOT 4
- Nestjs 5 The @Middleware() decorator is deprecated HOT 2
- npm install fails with 'ERESOLVE unable to resolve dependency tree' HOT 2
- change dependency to nest.js <= 9 HOT 2
- In CorsMiddleware, Type 'RequestHandler' is not assignable to type 'Promise<MiddlewareFunction<any, any, any>>' HOT 6
- Errors update @nest-middleware/[email protected] to 7.0.1 HOT 1
- Dependency error with NestJS 10 when installing @nest-middlewares/morgan HOT 1
- express-session typeorm store HOT 3
- Type Error Express-Bearer-Token
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nest-middlewares.