I have been looking into Websharper, and was wondering if it's possible to use it for static web apps. That is, not hosted in IIS, but as a static web page with javascript.
-
Why is this question tagged `f#`? – Juliet Jun 26 '10 at 00:17
-
Websharper is a platform for deploying web applications using only F#. It generates javascript from F# for the presentation and lets you write the server backend in the same code base. – Walt Jun 26 '10 at 01:35
-
1It has recently become possible with the use of Sitelets. – Dmitri Nesteruk Mar 15 '11 at 13:00
3 Answers
Current WebSharper release does not make this scenario easy. For the next release, we are developing server-side HTML combinators and page/website combinators. With these combinators, you will be able to define complete pages and linked websites in F#, and then either serve them via IIS or compile them out to static HTML.

- 4,714
- 19
- 36
-
-
The 2.1 release, about to be revealed to the public, contains a static page combinator abstraction called a "sitelet." – t0yv0 Jan 21 '11 at 13:55
I imagine that, in the worst case, there is a degenerate 'yes' answer, in that you could
- host a page in the web server that had static content and client-side javascript
- hit that page in the browser, and view & download source
- save that result and use it as static page content
and thus in that respect it behaves as a kind of F#-to-Javascript translator.
That said, I have not had time to try out WebSharper myself, and so I could be wrong, or even if I am right, there could be a simpler workflow for this scenario, or who knows what. Hopefully someone will step in with a better answer.

- 117,631
- 17
- 236
- 300
There's a few options you could use and WebSharper comes with several templates for these now a days. You can self host with owin or suave (templates for both available) you could also host with NancyFx or any other lightweight container and if you use a SPA template it's all static content

- 21,497
- 7
- 62
- 96