Having some trouble with giraffe-template on Mac M1, so decided to set up a Giraffe project manually. Started following the Doing it manually section of the Giraffe README, but got stuck right away, and I also couldn't see mentioned anywhere how the project could be served.
For the record, the Giraffe docs are great. I'm new to .NET, so the parts I'm struggling with are the basics of .NET project management, F#, and ASP.NET Core - it would be unreasonable to expect these topics covered in there.
I have to keep reminding myself that
, so if I can't find answers to my questions in the Giraffe docs, then it is probably because it is an ASP.NET Core topic (or an F# / .NET / etc. one).
How to create and serve a Giraffe project
Steps 0. to 5. follow the Get started with F# with command-line tools (.NET | Microsoft Learn) article.
(OPTIONAL) Create a new solution.
Enter the solution's directory.
Create an empty ASP.NET Core project.
(OPTIONAL) Add new project to solution.
Enter the project's directory.
Install dependencies.
Add the "entry point".
I chose to simply copy one of the sample codes from the Doing it manually section; I prefer the more functional approach, so here it is the second one:
Run / serve project.