Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
IoTSharp
IoTSharp
提交
01b389aa
IoTSharp
项目概览
IoTSharp
/
IoTSharp
9 个月 前同步成功
通知
15
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
IoTSharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
01b389aa
编写于
3月 14, 2019
作者:
麦壳饼
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update to vue.js
上级
bcb8b6eb
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
48 addition
and
14 deletion
+48
-14
.gitmodules
.gitmodules
+2
-2
IoTSharp.sln
IoTSharp.sln
+1
-1
IoTSharp/.gitignore
IoTSharp/.gitignore
+23
-2
IoTSharp/ClientApp
IoTSharp/ClientApp
+0
-0
IoTSharp/IoTSharp.csproj
IoTSharp/IoTSharp.csproj
+2
-1
IoTSharp/Startup.cs
IoTSharp/Startup.cs
+20
-8
未找到文件。
.gitmodules
浏览文件 @
01b389aa
[submodule "ClientApp"]
path = ClientApp
[submodule "
IoTSharp/
ClientApp"]
path =
IoTSharp/
ClientApp
url = https://github.com/IoTSharp/IoTSharp-UI.git
branch = master
IoTSharp.sln
浏览文件 @
01b389aa
...
...
@@ -12,7 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IoTSharp.Test", "IoTSharp.Test\IoTSharp.Test.csproj", "{70DFF66F-6791-4713-81F3-DD7A64B59185}"
EndProject
Project("{
FAE04EC0-301F-11D3-BF4B-00C04F79EFBC
}") = "IoTSharp", "IoTSharp\IoTSharp.csproj", "{CCD2C255-72D2-4A25-B0E9-E30FBEF774C7}"
Project("{
9A19103F-16F7-4668-BE54-9A1E7A4F7556
}") = "IoTSharp", "IoTSharp\IoTSharp.csproj", "{CCD2C255-72D2-4A25-B0E9-E30FBEF774C7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
...
...
IoTSharp/.gitignore
浏览文件 @
01b389aa
.DS_Store
node_modules/
npm-debug.log
# /Properties/launchSettings.json
package-lock.json
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
...
...
@@ -17,7 +25,6 @@
[Rr]eleases/
x64/
x86/
build/
bld/
bin/
Bin/
...
...
@@ -26,6 +33,12 @@ Obj/
# Visual Studio 2015 cache/options directory
.vs/
/wwwroot/dist/**
# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235
!/wwwroot/dist/_placeholder.txt
/yarn.lock
# MSTest test Results
[Tt]est[Rr]esult*/
...
...
@@ -40,6 +53,10 @@ TestResult.xml
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
...
...
@@ -179,7 +196,9 @@ ClientBin/
*.publishsettings
orleans.codegen.cs
/node_modules
# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235
/node_modules/**
!/node_modules/_placeholder.txt
# RIA/Silverlight projects
Generated_Code/
...
...
@@ -229,3 +248,5 @@ _Pvt_Extensions
# FAKE - F# Make
.fake/
.vscode/
ClientApp
@
71903e0d
比较
71903e0d
...
71903e0d
文件已移动
IoTSharp/IoTSharp.csproj
浏览文件 @
01b389aa
...
...
@@ -21,7 +21,7 @@
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
<!-- Set this to true if you enable server-side prerendering -->
<BuildServerSideRenderer>
fals
e</BuildServerSideRenderer>
<BuildServerSideRenderer>
tru
e</BuildServerSideRenderer>
</PropertyGroup>
<ItemGroup>
...
...
@@ -31,6 +31,7 @@
<None Remove="Migrations\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Changwei.AspNetCore.SpaServices.Extensions.VueCli" Version="1.0.0" />
<PackageReference Include="IoTSharp.X509Extensions" Version="1.3.3" />
<PackageReference Include="LiteDB" Version="4.1.4" />
<PackageReference Include="Microsoft.AspNetCore.App" />
...
...
IoTSharp/Startup.cs
浏览文件 @
01b389aa
using
IoTSharp.Data
;
using
IoTSharp.Data
;
using
Microsoft.AspNetCore.Authentication.JwtBearer
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Builder
;
...
...
@@ -7,7 +7,9 @@ using Microsoft.AspNetCore.Http;
using
Microsoft.AspNetCore.HttpOverrides
;
using
Microsoft.AspNetCore.Identity
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.SpaServices.AngularCli
;
using
Microsoft.AspNetCore.ResponseCompression
;
using
Microsoft.AspNetCore.SpaServices.VueCli
;
using
Microsoft.AspNetCore.SpaServices.Webpack
;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.Logging
;
...
...
@@ -16,6 +18,7 @@ using MQTTnet.AspNetCoreEx;
using
MQTTnet.Client
;
using
NSwag.AspNetCore
;
using
System
;
using
System.Configuration
;
using
System.IdentityModel.Tokens.Jwt
;
using
System.Linq
;
using
System.Reflection
;
...
...
@@ -55,6 +58,12 @@ namespace IoTSharp
services
.
AddLogging
(
loggingBuilder
=>
loggingBuilder
.
AddConsole
());
services
.
AddIoTSharpHub
(
Configuration
);
// Enable the Gzip compression especially for Kestrel
services
.
Configure
<
GzipCompressionProviderOptions
>(
options
=>
options
.
Level
=
System
.
IO
.
Compression
.
CompressionLevel
.
Optimal
);
services
.
AddResponseCompression
(
options
=>
{
options
.
EnableForHttps
=
true
;
});
services
.
AddIdentity
<
IdentityUser
,
IdentityRole
>()
.
AddRoles
<
IdentityRole
>()
...
...
@@ -77,11 +86,9 @@ namespace IoTSharp
configure
.
Description
=
description
?.
Description
;
});
services
.
AddTransient
<
ApplicationDBInitializer
>();
services
.
AddIoTSharpMqttServer
(
AppSettings
.
MqttBroker
);
services
.
AddMqttClient
(
AppSettings
.
MqttClient
);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
...
...
@@ -101,6 +108,7 @@ namespace IoTSharp
app
.
UseAuthentication
();
app
.
UseSwagger
();
app
.
UseHttpsRedirection
();
app
.
UseIoTSharpMqttClient
();
app
.
UseIotSharpMqttServer
();
...
...
@@ -108,8 +116,12 @@ namespace IoTSharp
{
ForwardedHeaders
=
ForwardedHeaders
.
XForwardedFor
|
ForwardedHeaders
.
XForwardedProto
});
app
.
UseResponseCompression
();
// No need if you use IIS, but really something good for Kestrel!
app
.
UseHttpsRedirection
();
// Idea: https://code.msdn.microsoft.com/How-to-fix-the-routing-225ac90f
// This avoid having a real mvc view. You have other way of doing, but this one works
// properly.
app
.
UseDefaultFiles
();
app
.
UseStaticFiles
();
app
.
UseSpaStaticFiles
();
...
...
@@ -126,10 +138,10 @@ namespace IoTSharp
// see https://go.microsoft.com/fwlink/?linkid=864501
spa
.
Options
.
SourcePath
=
"ClientApp"
;
spa
.
Options
.
StartupTimeout
=
new
TimeSpan
(
0
,
0
,
12
0
);
spa
.
Options
.
StartupTimeout
=
TimeSpan
.
FromSeconds
(
8
0
);
if
(
env
.
IsDevelopment
())
{
spa
.
Use
AngularCliServer
(
npmScript
:
"start
"
);
spa
.
Use
VueCliServer
(
npmScript
:
"serve
"
);
}
});
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录