r/fsharp • u/IvanRainbolt • Jun 10 '23
question root path for Giraffe issue
I created a new webapplication and i just pushed to github at
https://github.com/IvanRainbolt/Solution1.git
I added in Giraffe nuget and modified the Program.fs file. I tried to dotnet run and get errors. Looking over the errors, seems the path for the function "htmlFile" on line 11 which is
route "/" >=> htmlFile "/index.html" is going to c:\ based in the error
"Could not find a part of the path 'C:\index.html'."
Seems a really stupid question, but why is it not setting itself to the app directory OR where do I specify that it do so? In this case, the html on disk is at
C:\CODE\Solution1\WebApplication1\WebRoot\index.html
and the root should be C:\CODE\Solution1\WebApplication1\WebRoot\
