Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pi.hub
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
iot
pi.hub
Commits
96aa8745
Commit
96aa8745
authored
Jun 26, 2017
by
Martin Kotula
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.e1s.it:iot/pi.hub
parents
453ce884
ee8c5ed3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
Pi.Hub.Api/Program.cs
+11
-3
Pi.Hub.Api/appsettings.json
+4
-0
No files found.
Pi.Hub.Api/Program.cs
View file @
96aa8745
...
@@ -7,6 +7,7 @@ using System.Threading.Tasks;
...
@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using
Microsoft.AspNetCore
;
using
Microsoft.AspNetCore
;
using
Microsoft.AspNetCore.WebUtilities
;
using
Microsoft.AspNetCore.WebUtilities
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.Extensions.Configuration
;
namespace
Pi.Hub.Api
namespace
Pi.Hub.Api
{
{
...
@@ -14,14 +15,21 @@ namespace Pi.Hub.Api
...
@@ -14,14 +15,21 @@ namespace Pi.Hub.Api
{
{
public
static
void
Main
(
string
[]
args
)
public
static
void
Main
(
string
[]
args
)
{
{
BuildWebHost
(
args
).
Run
();
var
builder
=
new
ConfigurationBuilder
()
.
SetBasePath
(
Directory
.
GetCurrentDirectory
())
.
AddJsonFile
(
"appsettings.json"
);
var
configuration
=
builder
.
Build
();
BuildWebHost
(
args
,
configuration
).
Run
();
}
}
public
static
IWebHost
BuildWebHost
(
string
[]
args
)
=>
public
static
IWebHost
BuildWebHost
(
string
[]
args
,
IConfigurationRoot
configuration
)
=>
WebHost
WebHost
.
CreateDefaultBuilder
(
args
)
.
CreateDefaultBuilder
(
args
)
.
UseStartup
<
Startup
>()
.
UseStartup
<
Startup
>()
.
UseKestrel
(
opt
=>
opt
.
Listen
(
IPAddress
.
Parse
(
"169.254.25.213"
),
5000
))
.
UseKestrel
(
opt
=>
opt
.
Listen
(
IPAddress
.
Parse
(
configuration
[
"PiHub:Address"
]),
int
.
Parse
(
configuration
[
"PiHub:Port"
])
))
.
Build
();
.
Build
();
}
}
}
}
Pi.Hub.Api/appsettings.json
View file @
96aa8745
{
{
"PiHub"
:
{
"Address"
:
"10.0.200.22"
,
"Port"
:
5000
},
"Logging"
:
{
"Logging"
:
{
"IncludeScopes"
:
false
,
"IncludeScopes"
:
false
,
"LogLevel"
:
{
"LogLevel"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment