SaturnFramework / Saturn

Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
https://saturnframework.org
MIT License
703 stars 108 forks source link

Code samples [discussion] #305

Closed dredgy closed 3 years ago

dredgy commented 3 years ago

Hi, not really sure where to ask this, probably on F# slack but really wanting to swap my app over to Saturn. at least when it comes to routing, I just want to get an idea on how to do a few basic things before I jump right in, after writing basically my own framework from scratch on top of asp.net core. These are a few things I’d like to make sure can be done by Saturn. I am mainly looking at routing and http solutions as I have existing controller, authentication and view solutions (though the controllers I have are literally just functions). Ideally I’d start with routing and slowly migrate to full mvc on Saturn.

Cookies and access to httpcontext

Does Saturn or Giraffe provide a HttpContextAccessor or other ways to get/set cookies and redirect the browser?

Access to styles and images etc.

How do I expose a path similar to wwwroot in asp.net for client facing assets?

Thanks for any help you can provide, sorry if this is not the right place to ask!