Permalink
Browse files

2.0-pre release

  • Loading branch information...
1 parent 6ea87d5 commit 765c7805683df5477253b39edb460c41a0c577bd @neuecc committed Jul 27, 2016
View
@@ -107,3 +107,4 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
.vs/config/applicationhost.config
+.vs/restore.dg
View
Binary file not shown.
View
@@ -61,8 +61,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{52DEAA6E-C
NuGet\LightNode.Formatter.ProtoBuf.nuspec = NuGet\LightNode.Formatter.ProtoBuf.nuspec
NuGet\LightNode.Server.nuspec = NuGet\LightNode.Server.nuspec
NuGet\LightNode.Swagger.nuspec = NuGet\LightNode.Swagger.nuspec
+ NuGet\LightNode2.nuspec = NuGet\LightNode2.nuspec
NuGet\pack.bat = NuGet\pack.bat
+ NuGet\pack_LightNode2.bat = NuGet\pack_LightNode2.bat
NuGet\push.bat = NuGet\push.bat
+ NuGet\push_LightNode2.bat = NuGet\push_LightNode2.bat
README.md = README.md
NuGet\ReadMe.txt = NuGet\ReadMe.txt
EndProjectSection
@@ -97,13 +100,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".NET Core", ".NET Core", "{
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LightNode2", "Source\LightNode2\LightNode2.xproj", "{AAFA9D36-DB57-4CA2-9137-05CC4B9EC4D1}"
EndProject
-Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebApplicationCore1", "WebApplicationCore1\WebApplicationCore1.xproj", "{0EA8F2C9-A92C-4EE3-B43B-9A96498B6800}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2E1B3D87-7088-484B-A8DA-C7C10A07D94F}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
EndProjectSection
EndProject
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AspNetCoreSample", "Sample\AspNetCoreSample\AspNetCoreSample.xproj", "{0EA8F2C9-A92C-4EE3-B43B-9A96498B6800}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<package>
+ <metadata>
+ <id>LightNode</id>
+ <version>2.0.0-beta</version>
+ <title>LightNode</title>
+ <authors>neuecc</authors>
+ <owners>neuecc</owners>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>LightNode(Micro REST/RPC Framework) for ASP.NET Core.</description>
+ <language>en-US</language>
+ <licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
+ <projectUrl>https://github.com/neuecc/LightNode</projectUrl>
+ <tags>ASPNETCore Rest RPC</tags>
+ <dependencies>
+ <group targetFramework="netstandard1.6">
+ <dependency id="System.Threading.Tasks.Parallel" version="4.0.1" />
+ <dependency id="Microsoft.AspNetCore.Http.Abstractions" version="1.0.0" />
+ <dependency id="Microsoft.AspNetCore.Http.Features" version="1.0.0" />
+ <dependency id="Newtonsoft.Json" version="9.0.1" />
+ </group>
+ </dependencies>
+ </metadata>
+ <files>
+ <file src="..\Source\LightNode2\bin\Release\netstandard1.6\LightNode2.dll" target="lib\netstandard1.6" />
+ <file src="..\Source\LightNode2\bin\Release\netstandard1.6\LightNode2.xml" target="lib\netstandard1.6" />
+ </files>
+</package>
View
Binary file not shown.
@@ -0,0 +1 @@
+nuget pack LightNode2.nuspec
@@ -0,0 +1 @@
+nuget push LightNode.2.0.0-beta.nupkg -Source https://www.nuget.org/api/v2/package
View
@@ -2,6 +2,55 @@ LightNode
=========
LightNode is a Micro RPC/REST Framework built on OWIN. LightNode is a good alternative to the ASP.NET Web API and Nancy if you make a simple API. It is like Ruby's [Grape](https://github.com/intridea/grape) framework, [Slack API](https://api.slack.com/web)'s HTTP RPC-style methods. Implementation of the API is lightweight, powerful debugging supports with [Glimpse](http://getglimpse.com/), client code generation by T4 for PCL(HttpClient) and Unity3D.
+Update(2016-07-28), for ASP.NET Core
+---
+LightNode 2 has been started. You can install from `-Pre` packages.
+
+```
+PM> Install-Package LightNode -Pre
+```
+
+Simple ASP.NET Core Startup
+
+```csharp
+using LightNode;
+
+public class Startup
+{
+ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ {
+ app.UseLightNode(typeof(Startup));
+ }
+}
+```
+
+LightNode 2 includes swagger package. You can map for Swagger.
+
+```csharp
+public class Startup
+{
+ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ {
+ app.Map("/api", builder =>
+ {
+ builder.UseLightNode(typeof(Startup));
+ });
+
+ app.Map("/swagger", builder =>
+ {
+ var xmlName = "AspNetCoreSample.xml";
+ var xmlPath = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), xmlName);
+
+ builder.UseLightNodeSwagger(new LightNode.Swagger.SwaggerOptions("AspNetCoreSample", "/api")
+ {
+ XmlDocumentPath = xmlPath,
+ IsEmitEnumAsString = true
+ });
+ });
+ }
+}
+```
+
Installation
---
binary from NuGet, [LightNode.Server](https://nuget.org/packages/LightNode.Server/)
@@ -4,16 +4,14 @@
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
-
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>0ea8f2c9-a92c-4ee3-b43b-9a96498b6800</ProjectGuid>
- <RootNamespace>WebApplicationCore1</RootNamespace>
+ <RootNamespace>AspNetCoreSample</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
</PropertyGroup>
-
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
@@ -22,4 +20,4 @@
<DnxInvisibleContent Include=".bowerrc" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
-</Project>
+</Project>
@@ -5,7 +5,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
-namespace WebApplicationCore1
+namespace AspNetCoreSample
{
public class Program
{
@@ -10,52 +10,42 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
-using Glimpse;
using System.IO;
-namespace WebApplicationCore1
+namespace AspNetCoreSample
{
public class Startup
{
- // This method gets called by the runtime. Use this method to add services to the container.
- // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddGlimpse();
- }
-
- // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
- app.UseGlimpse();
-
- loggerFactory.AddConsole();
-
- if (env.IsDevelopment())
- {
- app.UseDeveloperExceptionPage();
- }
-
app.Map("/api", builder =>
{
builder.UseLightNode(typeof(Startup));
});
app.Map("/swagger", builder =>
{
- var xmlName = "WebApplicationCore1.xml";
+ var xmlName = "AspNetCoreSample.xml";
var xmlPath = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), xmlName);
- builder.UseLightNodeSwagger(new LightNode.Swagger.SwaggerOptions("WebApplicationCore1", "/api") // baseApi is LightNode's root
+ builder.UseLightNodeSwagger(new LightNode.Swagger.SwaggerOptions("AspNetCoreSample", "/api")
{
XmlDocumentPath = xmlPath,
IsEmitEnumAsString = true
});
});
+ }
+ }
+ public class Toriaezu : LightNodeContract
+ {
+ public string Echo(string x)
+ {
+ return x;
}
}
+
/// <summary>
/// aaa
/// </summary>
@@ -0,0 +1,50 @@
+{
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "version": "1.0.0",
+ "type": "platform"
+ },
+ "Microsoft.AspNetCore.Diagnostics": "1.0.0",
+ "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
+ "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
+ "Microsoft.Extensions.Logging.Console": "1.0.0",
+ "LightNode2": "2.0.0-*"
+ },
+
+ "tools": {
+ "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
+ },
+
+ "frameworks": {
+ "netcoreapp1.0": {
+ "imports": [
+ "dotnet5.6",
+ "portable-net45+win8"
+ ]
+ }
+ },
+
+ "buildOptions": {
+ "emitEntryPoint": true,
+ "preserveCompilationContext": true,
+ "xmlDoc": true,
+ "nowarn": [ "1591" ]
+ },
+
+ "runtimeOptions": {
+ "configProperties": {
+ "System.GC.Server": true
+ }
+ },
+
+ "publishOptions": {
+ "include": [
+ "wwwroot",
+ "web.config"
+ ]
+ },
+
+ "scripts": {
+ "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
+ }
+}
Oops, something went wrong.

0 comments on commit 765c780

Please sign in to comment.