Closed MFernstrom closed 7 years ago
Great. Could you provide a minimal example showing the problem? :-)
No problem
BrookStaticFileRegisterDirectory('css/', PublicHTMLDir + 'css/');
Then try to access localhost:8080/css/style.css
I'm running this on a Mac (El Capitan), possible it only affects OSX.
I also had to include the full path for things, one of the demos look like this
MimeTypes.LoadFromFile('mime.types');
To make it work, I had to do
MimeTypes.LoadFromFile(IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0)))+'mime.types');
It could be related I guess.
I also had to include the full path for things, one of the demos look like this MimeTypes.LoadFromFile('mime.types');
The assumption is that you run it from the same directory as the mime.types file. Otherwise, it follows whatever current working directory is, which could differ from one platform to another.
I did place it in the same folder, still had to give full path.
I did place it in the same folder, still had to give full path.
Do you RUN it from the same folder?
I ran it by using the Lazarus run function.
But that's a different issue, the code change only changes the static folder check with the missing /
I ran it by using the Lazarus run function.
Well, that's actually the problem with full path needs for mime.types.
But that's a different issue, the code change only changes the static folder check with the missing /
Yes, I know. That one is OK.
Oh ok so the path issue isn't an issue after building/bundling, that's good news
The file path for mime file I mean.
Anything else I can provide?
Not sure if my fix is good or not, but it fixed the issue, hopefully someone more experienced can take a quick peek and Yay or Nay it.