1

Is it possible to choose to serve files only from a specific folder using Rikulo stream? I've tried

new StreamServer(uriMapping: _mapping, homeDir: 'my/web/webapp/app')

but I'm not getting the desired results as it's still serving files under the 'web' directory.

basheps
  • 10,034
  • 11
  • 36
  • 45

1 Answers1

1

When homeDir is specified with a relative path, it is assumed to be relative to the current directory (Directory.current.path). I think it is not what you expect. You can use an absolute path for better control.

After examining the code, I think the relative path is better to base on the root directory rather than the current directory. Please follow Issue 29 for details. Also refer to the sample app here.

Tom Yeh
  • 1,987
  • 2
  • 15
  • 23