I am currently serving static files for some developer static docs I have created, I am currently using

app.useStaticAssets(docsLocation, {
  prefix: "/docs/"
})

My question is that I have another directory that I would like to serve, it also has static content, is it possible to serve from different locations and using a different prefix for each location?

Any ideas, this is not covered in the documentation.

Thanks

1 Answers

2
Kim Kern On Best Solutions

You can just register static assets multiple times:

app.useStaticAssets(docsLocation1, { prefix: "/docs1/" })
app.useStaticAssets(docsLocation2, { prefix: "/docs2/" })