Skip to content

Commit

Permalink
Upgrade to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Aug 10, 2019
1 parent 2d64ca7 commit c6c1352
Show file tree
Hide file tree
Showing 10 changed files with 1,290 additions and 944 deletions.
3 changes: 1 addition & 2 deletions MyApp.ServiceInterface/MyServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public class FallbackForClientRoutes
public class MyServices : Service
{
//Return index.html for unmatched requests so routing is handled on client
public object Any(FallbackForClientRoutes request) =>
new PageResult(Request.GetPage("/"));
public object Any(FallbackForClientRoutes request) => Request.GetPageResult("/");

public object Any(Hello request)
{
Expand Down
13 changes: 10 additions & 3 deletions MyApp/AppHost.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
using System.IO;
using System;
using System.Collections.Generic;
using System.IO;
using Funq;
using MyApp.ServiceInterface;
using ServiceStack;
using ServiceStack.Auth;
using ServiceStack.Configuration;
using ServiceStack.FluentValidation;
using ServiceStack.Web;

namespace MyApp
{
Expand All @@ -12,7 +17,7 @@ public class AppHost : AppHostBase
/// Base constructor requires a Name and Assembly where web service implementation is located
/// </summary>
public AppHost()
: base("MyApp", typeof(MyServices).Assembly) {}
: base("MyApp", typeof(MyServices).Assembly) { }

/// <summary>
/// Application specific configuration
Expand All @@ -25,10 +30,12 @@ public override void Configure(Container container)
DebugMode = AppSettings.Get("DebugMode", false),
WebHostPhysicalPath = MapProjectPath("~/wwwroot"),
AddRedirectParamsToQueryString = true,
UseSecureCookies = true,
UseCamelCase = true,
});

Plugins.Add(new SharpPagesFeature());
}
}
}

}
22 changes: 22 additions & 0 deletions MyApp/Configure.Ui.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ServiceStack;

namespace MyApp
{
public class ConfigureUi : IConfigureAppHost
{
public void Configure(IAppHost appHost)
{
// if wwwroot/ is empty, build Client App with 'npm run build'
var svgDir = appHost.RootDirectory.GetDirectory("/svg");
if (svgDir != null)
{
Svg.Load(svgDir);
}
}
}
}

22 changes: 13 additions & 9 deletions MyApp/MyApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AppHost.cs" />
<Content Include="babel.config.js" />
<Content Include="Global.asax" />
<Compile Include="Configure.Auth.cs" />
<Compile Include="Configure.AuthRepository.cs" />
<Compile Include="Configure.Ui.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
Expand All @@ -127,13 +131,21 @@
</None>
<Content Include="public\favicon.ico" />
<Content Include="public\index.html" />
<Content Include="public\svg\svg-icons\logo.svg" />
<Content Include="src\app.scss" />
<Content Include="src\App.vue" />
<Content Include="src\assets\img\desert.jpg" />
<Content Include="src\assets\img\favicon-32x32.png" />
<Content Include="src\assets\img\logo.png" />
<Content Include="src\assets\img\logo.svg" />
<Content Include="src\assets\img\v.png" />
<Content Include="src\assets\logo.png" />
<Content Include="src\components\HelloWorld.vue" />
<Content Include="src\home\Home.vue" />
<Content Include="src\plugins\vuetify.js" />
<Content Include="src\view1\View1.vue" />
<Content Include="src\view2\View2.vue" />
<Content Include="src\views\About.vue" />
<Content Include="src\views\Home.vue" />
<Content Include="tests\e2e\plugins\index.js" />
<Content Include="tests\e2e\specs\test.js" />
<Content Include="tests\e2e\support\commands.js" />
Expand All @@ -144,14 +156,6 @@
<Content Include="vue.config.js" />
<Content Include="Web.config" />
<Content Include="tslint.json" />
<Content Include="src\app.scss" />
<Content Include="src\App.vue" />
<Content Include="src\components\HelloWorld.vue" />
<Content Include="src\home\Home.vue" />
<Content Include="src\view1\View1.vue" />
<Content Include="src\view2\View2.vue" />
<Content Include="src\views\About.vue" />
<Content Include="src\views\Home.vue" />
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
Expand Down
107 changes: 48 additions & 59 deletions MyApp/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,62 +5,51 @@
-->
<configuration>

<appSettings>
<add key="DebugMode" value="true" />
</appSettings>

<system.web>
<compilation debug="true" />
</system.web>

<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<urlCompression doStaticCompression="true" doDynamicCompression="false" />
<handlers>
<add path="*" name="ServiceStack.Factory" type="ServiceStack.HttpHandlerFactory, ServiceStack" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true" />
</handlers>
<defaultDocument>
<files>
<clear />
<add value="default.html" />
</files>
</defaultDocument>
<staticContent>
<remove fileExtension=".ts" />
<mimeMap fileExtension=".ts" mimeType="application/x-typescript" />
<mimeMap fileExtension=".tsx" mimeType="application/x-typescript" />
</staticContent>
</system.webServer>

<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<dependentAssembly>

<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />

</dependentAssembly>

<dependentAssembly>

<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />

</dependentAssembly>

<dependentAssembly>

<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />

</dependentAssembly>

</assemblyBinding>

</runtime>
</configuration>
<appSettings>
<add key="DebugMode" value="true" />
</appSettings>

<system.web>
<compilation debug="true" />
</system.web>

<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<urlCompression doStaticCompression="true" doDynamicCompression="false" />
<handlers>
<add path="*" name="ServiceStack.Factory" type="ServiceStack.HttpHandlerFactory, ServiceStack" verb="*" preCondition="integratedMode" resourceType="Unspecified" allowPathInfo="true" />
</handlers>
<defaultDocument>
<files>
<clear />
<add value="default.html" />
</files>
</defaultDocument>
<staticContent>
<remove fileExtension=".ts" />
<mimeMap fileExtension=".ts" mimeType="application/x-typescript" />
<mimeMap fileExtension=".tsx" mimeType="application/x-typescript" />
</staticContent>
</system.webServer>

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.4.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Loading

0 comments on commit c6c1352

Please sign in to comment.