-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
32,040 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*/node_modules | ||
*/npm-debug.log |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build | ||
WORKDIR /source | ||
WORKDIR /app | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \ | ||
&& apt-get install -y --no-install-recommends nodejs \ | ||
&& echo "node version: $(node --version)" \ | ||
&& echo "npm version: $(npm --version)" \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY VueNuxtTemplate/package.json . | ||
COPY VueNuxtTemplate/npm-shrinkwrap.json . | ||
|
||
RUN npm --prefix VueNuxtTemplate install | ||
|
||
COPY . . | ||
RUN dotnet restore | ||
|
||
WORKDIR /source/VueNuxtTemplate | ||
RUN dotnet publish -c release -o /app --no-restore | ||
WORKDIR /app/VueNuxt | ||
RUN dotnet publish -c release -o /out --no-restore | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS runtime | ||
WORKDIR /app | ||
COPY --from=build /app ./ | ||
ENTRYPOINT ["dotnet", "VueNuxtTemplate.dll"] | ||
COPY --from=build /out ./ | ||
ENTRYPOINT ["dotnet", "VueNuxt.dll"] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using ServiceStack; | ||
using VueNuxt.ServiceModel; | ||
|
||
namespace VueNuxt.ServiceInterface | ||
{ | ||
public class MyServices : Service | ||
{ | ||
public object Any(Hello request) | ||
{ | ||
return new HelloResponse { Result = $"Hello, {request.Name}!" }; | ||
} | ||
|
||
public object Any(GetLinks request) => new GetLinksResponse | ||
{ | ||
Results = new Dictionary<string, string> | ||
{ | ||
{"servicestack.net", "https://servicestack.net"}, | ||
{"StackOverflow", "http://stackoverflow.com/search?q=servicestack"}, | ||
{"Customer Forums", "https://forums.servicestack.net"}, | ||
{"Issue Tracker", "https://github.com/ServiceStack/Issues"}, | ||
{"Feature Requests", "http://servicestack.uservoice.com/forums/176786-feature-requests"}, | ||
{"Release Notes", "https://servicestack.net/release-notes"}, | ||
{"Live Demos", "https://github.com/ServiceStackApps/LiveDemos"}, | ||
{".NET Core Live Demos", "https://github.com/NetCoreApps/LiveDemos"}, | ||
{"Gistlyn", "http://gistlyn.com"}, | ||
} | ||
}; | ||
|
||
public object Any(GetPost request) => new GetPostResponse | ||
{ | ||
Id = request.Id, | ||
Title = $"Title {request.Id}", | ||
Description = $"Post Description {request.Id}", | ||
}; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net5</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="ServiceStack" Version="5.*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\VueNuxt.ServiceModel\VueNuxt.ServiceModel.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Collections.Generic; | ||
using ServiceStack; | ||
|
||
namespace VueNuxt.ServiceModel | ||
{ | ||
[Route("/links")] | ||
public class GetLinks : IReturn<GetLinksResponse> {} | ||
|
||
public class GetLinksResponse | ||
{ | ||
public Dictionary<string,string> Results { get; set; } | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Collections.Generic; | ||
using ServiceStack; | ||
|
||
namespace VueNuxt.ServiceModel | ||
{ | ||
[Route("/posts")] | ||
public class GetPost : IReturn<GetPostResponse> | ||
{ | ||
public int Id { get; set; } | ||
} | ||
|
||
public class GetPostResponse | ||
{ | ||
public int Id { get; set; } | ||
public string Title { get; set; } | ||
public string Description { get; set; } | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using ServiceStack; | ||
|
||
namespace VueNuxt.ServiceModel | ||
{ | ||
[Route("/hello")] | ||
[Route("/hello/{Name}")] | ||
public class Hello : IReturn<HelloResponse> | ||
{ | ||
public string Name { get; set; } | ||
} | ||
|
||
public class HelloResponse | ||
{ | ||
public string Result { get; set; } | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
As part of our [Physical Project Structure](https://docs.servicestack.net/physical-project-structure) convention we recommend maintaining any shared non Request/Response DTOs in the `ServiceModel.Types` namespace. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="ServiceStack.Interfaces" Version="5.*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Types\" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using Funq; | ||
using ServiceStack; | ||
using NUnit.Framework; | ||
using VueNuxt.ServiceInterface; | ||
using VueNuxt.ServiceModel; | ||
|
||
namespace VueNuxt.Tests | ||
{ | ||
public class IntegrationTest | ||
{ | ||
const string BaseUri = "http://localhost:2000/"; | ||
private readonly ServiceStackHost appHost; | ||
|
||
class AppHost : AppSelfHostBase | ||
{ | ||
public AppHost() : base(nameof(IntegrationTest), typeof(MyServices).Assembly) { } | ||
|
||
public override void Configure(Container container) | ||
{ | ||
} | ||
} | ||
|
||
public IntegrationTest() | ||
{ | ||
appHost = new AppHost() | ||
.Init() | ||
.Start(BaseUri); | ||
} | ||
|
||
[OneTimeTearDown] | ||
public void OneTimeTearDown() => appHost.Dispose(); | ||
|
||
public IServiceClient CreateClient() => new JsonServiceClient(BaseUri); | ||
|
||
[Test] | ||
public void Can_call_Hello_Service() | ||
{ | ||
var client = CreateClient(); | ||
|
||
var response = client.Get(new Hello { Name = "World" }); | ||
|
||
Assert.That(response.Result, Is.EqualTo("Hello, World!")); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using NUnit.Framework; | ||
using ServiceStack; | ||
using ServiceStack.Testing; | ||
using VueNuxt.ServiceInterface; | ||
using VueNuxt.ServiceModel; | ||
|
||
namespace VueNuxt.Tests | ||
{ | ||
public class UnitTest | ||
{ | ||
private readonly ServiceStackHost appHost; | ||
|
||
public UnitTest() | ||
{ | ||
appHost = new BasicAppHost().Init(); | ||
appHost.Container.AddTransient<MyServices>(); | ||
} | ||
|
||
[OneTimeTearDown] | ||
public void OneTimeTearDown() => appHost.Dispose(); | ||
|
||
[Test] | ||
public void Can_call_MyServices() | ||
{ | ||
var service = appHost.Container.Resolve<MyServices>(); | ||
|
||
var response = (HelloResponse)service.Any(new Hello { Name = "World" }); | ||
|
||
Assert.That(response.Result, Is.EqualTo("Hello, World!")); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net5</TargetFramework> | ||
<DebugType>portable</DebugType> | ||
<OutputType>Library</OutputType> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\VueNuxt.ServiceInterface\VueNuxt.ServiceInterface.csproj" /> | ||
<ProjectReference Include="..\VueNuxt.ServiceModel\VueNuxt.ServiceModel.csproj" /> | ||
|
||
<PackageReference Include="NUnit" Version="3.12.*" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="3.17.*" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.*" /> | ||
<PackageReference Include="ServiceStack" Version="5.*" /> | ||
<PackageReference Include="ServiceStack.Kestrel" Version="5.*" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26730.3 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VueNuxt", "VueNuxt\VueNuxt.csproj", "{5F817400-1A3A-48DF-98A6-E7E5A3DC762F}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VueNuxt.ServiceInterface", "VueNuxt.ServiceInterface\VueNuxt.ServiceInterface.csproj", "{5B8FFF01-1E0B-477D-9D7F-93016C128B23}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VueNuxt.ServiceModel", "VueNuxt.ServiceModel\VueNuxt.ServiceModel.csproj", "{0127B6CA-1B79-46A6-8307-B36836D107F0}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VueNuxt.Tests", "VueNuxt.Tests\VueNuxt.Tests.csproj", "{455EC1EF-134F-4CD4-9C78-E813E4E6D8F6}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{5F817400-1A3A-48DF-98A6-E7E5A3DC762F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{5F817400-1A3A-48DF-98A6-E7E5A3DC762F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{5F817400-1A3A-48DF-98A6-E7E5A3DC762F}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{5F817400-1A3A-48DF-98A6-E7E5A3DC762F}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{5B8FFF01-1E0B-477D-9D7F-93016C128B23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{5B8FFF01-1E0B-477D-9D7F-93016C128B23}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{5B8FFF01-1E0B-477D-9D7F-93016C128B23}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{5B8FFF01-1E0B-477D-9D7F-93016C128B23}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{0127B6CA-1B79-46A6-8307-B36836D107F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{0127B6CA-1B79-46A6-8307-B36836D107F0}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{0127B6CA-1B79-46A6-8307-B36836D107F0}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{0127B6CA-1B79-46A6-8307-B36836D107F0}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{455EC1EF-134F-4CD4-9C78-E813E4E6D8F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{455EC1EF-134F-4CD4-9C78-E813E4E6D8F6}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{455EC1EF-134F-4CD4-9C78-E813E4E6D8F6}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{455EC1EF-134F-4CD4-9C78-E813E4E6D8F6}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {02854F2A-8EF4-468E-80A3-CD64BBAF5D15} | ||
EndGlobalSection | ||
EndGlobal |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_size = 2 | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.cs] | ||
indent_size = 4 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# js vendor file with import/require | ||
assets/** | ||
|
||
# static vendor file . use with nuxt.config.js script | ||
static/** | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# Nuxt build | ||
.nuxt | ||
|
||
# Nuxt generate | ||
wwwroot |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true | ||
}, | ||
parserOptions: { | ||
parser: 'babel-eslint' | ||
}, | ||
extends: [ | ||
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention | ||
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. | ||
'plugin:vue/essential', | ||
], | ||
// required to lint *.vue files | ||
plugins: [ | ||
'vue' | ||
], | ||
// add your custom rules here | ||
rules: {} | ||
} |
Oops, something went wrong.