Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koistya/fsharp-owin-sample
Web application server sample project with Owin / Katana and F#
https://github.com/koistya/fsharp-owin-sample
Last synced: 13 days ago
JSON representation
Web application server sample project with Owin / Katana and F#
- Host: GitHub
- URL: https://github.com/koistya/fsharp-owin-sample
- Owner: koistya
- License: other
- Created: 2014-06-05T09:25:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-06T16:39:49.000Z (over 10 years ago)
- Last Synced: 2024-10-03T23:41:15.743Z (about 1 month ago)
- Language: F#
- Size: 238 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Owin Sample with F#
It can be hosted in either IIS or as a Self-Host app. You can use this project as a
template or reference for creating server-side portion of a
[single-page application](http://en.wikipedia.org/wiki/Single-page_application) (SPA).![F# Owin Sample Project](http://i.imgur.com/yJL8nLZ.png)
### References
* [Getting Started with OWIN and Katana](http://www.asp.net/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana)
* [How to create a pure F# ASP.NET Web API project](http://blog.ploeh.dk/2013/08/23/how-to-create-a-pure-f-aspnet-web-api-project/)### Download
[![Web Application Server](http://i.imgur.com/PA5swd0.png)](http://visualstudiogallery.msdn.microsoft.com/c7ea6e81-b383-40e4-899c-4a5ab9d68f02)
http://visualstudiogallery.msdn.microsoft.com/c7ea6e81-b383-40e4-899c-4a5ab9d68f02
#### OWIN Startup (startup.fs)
```fsharp
namespace Serveropen Owin
open Microsoft.Owintype Startup() =
member x.Configuration(app: Owin.IAppBuilder) =
app.Run(fun ctx ->
ctx.Response.ContentType <- "text/plain"
ctx.Response.WriteAsync("Owin Sample with F#")
) |> ignore[)>]
do ()
```You can plug [SignalR](http://www.asp.net/signalr) and/or [Nancy](http://nancyfx.org/)
framework into this class and start from there. And the front-end part of the SPA can
be developed in a separate project and hosted in CDN (ex.: [angular-seed](https://github.com/angular/angular-seed)).Also see: [Owin Startup Class Detection](http://www.asp.net/aspnet/overview/owin-and-katana/owin-startup-class-detection)
#### Project settings for local debugging
![OwinHost](http://i.imgur.com/nlVcWxa.png)
```xml
...
$(SolutionDir)packages\OwinHost.3.0.0-beta1\tools\OwinHost.exe
-d "$(ProjectDir)"
```#### Project settings for web publishing
```xml
...
...
{349c5851-65df-11da-9384-00065b846f21};{f2a71f9b-5d33-465a-a702-920d77279786}
...
...
10.0
$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
```