serve-static icon indicating copy to clipboard operation
serve-static copied to clipboard

serveRoot doesn't work with fastify platform

Open ianzone opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current behavior

the route set on serveRoot will return 404

Minimum reproduction code

https://github.com/ianzone/lambda-nestify/tree/serve-static

Steps to reproduce

  1. pnpm i
  2. pnpm run dev
  3. go to /client

Expected behavior

return the static site

Package version

3.0.1

NestJS version

9.3.9

Node.js version

v18.12.0

In which operating systems have you tested?

  • [ ] macOS
  • [ ] Windows
  • [X] Linux

Other

No response

ianzone avatar Mar 11 '23 17:03 ianzone

I also encountered this problem, and I used https://github.com/fastify/fastify-static solve

yiqia avatar Mar 27 '23 09:03 yiqia

I also encountered this problem, and I used https://github.com/fastify/fastify-static solve

that's included in my reproduction repo

ianzone avatar Mar 27 '23 09:03 ianzone

@ianzone I think what @yiqia meant is that they use that package directly rather than via this nest module.

ghost avatar Jul 12 '23 22:07 ghost