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

serveRoot doesn't work with fastify platform

ianzone opened this issue · comments

commented

Is there an existing issue for this?

  • 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
  • Linux

Other

No response

commented

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

commented

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

that's included in my reproduction repo

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