{"id":13658638,"url":"https://github.com/dotnet-websharper/owin","last_synced_at":"2025-04-06T05:31:57.102Z","repository":{"id":23125402,"uuid":"26480106","full_name":"dotnet-websharper/owin","owner":"dotnet-websharper","description":"Wrappers for hosting WebSharper sitelets and remoting components in OWIN projects","archived":false,"fork":false,"pushed_at":"2023-06-17T05:23:49.000Z","size":416,"stargazers_count":10,"open_issues_count":6,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-18T21:52:39.628Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotnet-websharper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-11-11T10:25:47.000Z","updated_at":"2021-06-23T21:06:02.000Z","dependencies_parsed_at":"2024-04-27T13:40:48.061Z","dependency_job_id":null,"html_url":"https://github.com/dotnet-websharper/owin","commit_stats":null,"previous_names":["intellifactory/websharper.owin"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fowin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fowin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fowin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fowin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnet-websharper","download_url":"https://codeload.github.com/dotnet-websharper/owin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247440362,"owners_count":20939220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T05:01:01.320Z","updated_at":"2025-04-06T05:31:55.423Z","avatar_url":"https://github.com/dotnet-websharper.png","language":"C#","funding_links":[],"categories":["Libraries"],"sub_categories":["Server-side hosting"],"readme":"﻿# Overview\r\n\r\nThis library allows you to run a [WebSharper](http://websharper.com)\r\nSitelet application through an [OWIN](http://owin.org/) interface,\r\nversion 1.0. In the terminology of [the OWIN\r\nspecification](http://owin.org/spec/spec/owin-1.0.0.html), WebSharper\r\nis a Web Framework and WebSharper.Owin is an adapter layer for it.\r\n\r\nAfter adding the reference to the project all the classes can be found\r\nunder the `WebSharper.Owin` module.\r\n\r\n# Usage\r\n\r\nWebSharper.Owin provides its functionality through several extension\r\nmethods on the `IAppBuilder` type. They are the following:\r\n\r\n```fsharp\r\nUseDiscoveredSitelet : webRoot: string -\u003e IAppBuilder\r\n```\r\n\r\nInspects the `webRoot` folder, looking for an assembly in the `bin`\r\nsubfolder that contains a WebSharper Sitelet, and runs this Sitelet\r\nwith `webRoot` as the root folder.\r\n\r\n```fsharp\r\nUseSitelet : webRoot: string * Sitelet\u003c'T\u003e -\u003e IAppBuilder\r\n```\r\n\r\nRuns the provided Sitelet with `webRoot` as the root folder, using\r\nWebSharper metadata loaded from assemblies located in the `bin`\r\nsubfolder of `webRoot`.\r\n\r\n```fsharp\r\nUseCustomSitelet : Options * Sitelet\u003c'T\u003e -\u003e IAppBuilder\r\n```\r\n\r\nRuns the provided Sitelet. Allows a more customized setup than the\r\nprevious methods, for example running a Sitelet whose code isn't\r\nlocated in the `bin` subfolder of the root folder, or running the\r\nSitelet with a URL prefix.\r\n\r\n```fsharp\r\nUseWebSharperRemoting : webRoot: string -\u003e IAppBuilder\r\n```\r\n\r\nRuns the WebSharper Remoting service, allowing WebSharper-compiled\r\nclient-side code to invoke `[\u003cRpc\u003e]`-annotated server-side functions.\r\nNote that the Remoting service is automatically run by the above\r\nmethods `UseDiscoveredSitelet` and `UseSitelet`, as well as\r\n`UseCustomSitelet` if `options.RunRemoting` is set to `true`.\r\n\r\n# Notes\r\n\r\nThis library does not take care of serving the files extracted from\r\nWebSharper assemblies, such as the generated JavaScript files, from\r\nthe file system. You need to use a static files middleware. The\r\nexample self-hosted Sitelet application uses a middleware available\r\nfrom NuGet as `Microsoft.Owin.StaticFiles`, as follows:\r\n\r\n```fsharp\r\nopen global.Owin\r\nopen Microsoft.Owin.StaticFiles\r\nopen Microsoft.Owin.FileSystems\r\nopen WebSharper.Owin\r\n\r\nlet RunSitelet (appB: IAppBuilder) mySitelet rootFolder =\r\n    appB.UseStaticFiles(\r\n        StaticFileOptions(\r\n            FileSystem = PhysicalFileSystem(rootFolder)))\r\n        .UseSitelet(rootFolder, mySitelet)\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet-websharper%2Fowin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnet-websharper%2Fowin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet-websharper%2Fowin/lists"}