Last active
April 23, 2020 10:49
-
-
Save bjoerntx/a0d15301b8a204570bb81f9ed1c4999b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// enable local 'App_Data' folder to access local documents | |
AppDomain.CurrentDomain.SetData("DataDirectory", System.IO.Path.Combine(env.ContentRootPath, "App_Data")); | |
// serve static linked files (JavaScript and CSS for the editor) | |
app.UseStaticFiles(new StaticFileOptions | |
{ | |
FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider( | |
System.IO.Path.Combine(System.IO.Path.GetDirectoryName( | |
System.Reflection.Assembly.GetEntryAssembly().Location), | |
"TXTextControl.Web")), | |
RequestPath = "/TXTextControl.Web" | |
}); | |
// enable Web Sockets | |
app.UseWebSockets(); | |
// attach the Text Control WebSocketHandler middleware | |
app.UseMiddleware<TXTextControl.Web.WebSocketMiddleware>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment