-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document / provide samples for newbie use cases #368
Comments
Great input. As for serving files:
What would be great would be if you'd port these samples to the docs. |
OK, I'll have a bash :-) |
Because I started using suave as well and felt the same here some things that actually helped a lot: Stuff I had to figure out myself (and couldn't find good docs):
Whats the most |
@matthid How are you hooking into AppInsights currently? Just using the raw SDK? As long as you can output logs to Trace, I believe that Azure should be able to pick that up and display / search through AI. I haven't been able to get the rich set of "raw" metrics through AI yet though even when hosting Suave through an Azure Website. |
@haf ehm. What's the syntax for the markup in the docs? Doesn't look like regular markdown to me - how can I preview what it will look like. |
@matthid I would use the trace information in HttpContext to associate log lines with the request. A new trace id is generated every time a request is accepted. I have been hoping for people to start to discover Logary, which can shove this information to e.g. Kibana and Grafana, or to help me create a zipkin target. Something like open Suave
open Logary
let logger = Logging.getCurrentLogger ()
let logging app =
context <| fun ctx ->
Logger.time logger (fun _ -> app ctx)
let main argv =
startWebServer defaultConfig (logging (App.entryPoint)) |
@isaacabraham It's markdown, but with some custom variant for code highlighting. You can try it by running |
An example of authenticating with an OAuth 2/OpenId Connect provider would also be helpful. Can suave use any existing libraries for this? |
Ticked the logging pieces as I've made logging the default in v2. |
"Ensuring webparts are always evaluated. By default a simple web part e.g. OK (sprintf "%O" DateTime.UtcNow) only gets evaluated initially. How do you force it to always get reevaluated? The answer is out there, but it's not easy to find." The answer is warbler https://stackoverflow.com/questions/40561394/f-suave-warbler-function |
I'm loving Suave, but there are a number of common use cases people will go through the first time they try Suave and want to get a basic API or website going. The documentation for these areas is (IMHO) either: -
I know that there's the Suave Music Store - which is a great example of using Suave - but most people will come to the main Suave website for help first, and it's here that I think getting-up-and-running scenarios / recipes should live. Here's a list of some of the questions / issues I had when starting with Suave. Some of them are already documented, but I'll put them all here anyway (and I'm happy to document the really simple ones myself): -
browseFile
or similar - this (and variants) should be mentioned here with an example. This is (IMHO) a really common use case for people that e.g. want to serve up static content (HTML, js, css etc.) to host a SPA website and want to use F# for the back-end API.OK (sprintf "%O" DateTime.UtcNow)
only gets evaluated initially. How do you force it to always get reevaluated? The answer is out there, but it's not easy to find.HttpBinding.mk
method when I first needed to do this - I wrote it all out longhand using copy-and-update record syntax which looks terrible.That's all I can think of at the moment. Hope it's useful!
The text was updated successfully, but these errors were encountered: