Static page with Websharper?

I searched Websharper and wondered if it can be used for static web applications. That is, it is not hosted in IIS, but as a static web page with javascript.

+7
f # websharper
source share
3 answers

The current version of WebSharper does not simplify this scenario. In the next issue, we are developing server-side combiners and combiners of pages and websites. With these combinators, you can define full pages and related sites in F #, and then either serve them through IIS or compile them into static HTML.

+6
source share

I assume that in the worst case there is a degenerative answer of "yes" as you could

  • host a page on a web server with static content and client side javascript
  • click this page in your browser and browse and download the source
  • save this result and use it as static page content

and therefore, in this regard, he behaves as a kind of translator of F # -to-Javascript.

However, I didn’t have time to try WebSharper myself, and therefore I can be wrong, or even if I’m right, there may be a simpler workflow for this scenario or who knows what. Hope someone comes in with a better answer.

+1
source share

There are several options you could use, and WebSharper comes with several templates for these days. You can host with owin or suave (templates for both available), you can also host with NancyFx or any other lightweight container, and if you use the SPA template, all its static content

0
source share

All Articles