Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
b6ca8966
Commit
b6ca8966
authored
Jun 21, 2017
by
Jeremy Bokobza
Committed by
GitHub
Jun 21, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #105 from bokobza/master
configurable api uri
parents
049e63f6
9d148bb7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
4 deletions
+24
-4
Program.cs
Breeze/src/Breeze.Api/Program.cs
+3
-3
launch bitcoin main.bat
Breeze/src/Breeze.Daemon/Launchers/launch bitcoin main.bat
+2
-0
launch bitcoin test.bat
Breeze/src/Breeze.Daemon/Launchers/launch bitcoin test.bat
+2
-0
launch stratis main.bat
Breeze/src/Breeze.Daemon/Launchers/launch stratis main.bat
+2
-0
launch stratis test.bat
Breeze/src/Breeze.Daemon/Launchers/launch stratis test.bat
+2
-0
Program.cs
Breeze/src/Breeze.Daemon/Program.cs
+13
-1
No files found.
Breeze/src/Breeze.Api/Program.cs
View file @
b6ca8966
...
@@ -9,16 +9,16 @@ namespace Breeze.Api
...
@@ -9,16 +9,16 @@ namespace Breeze.Api
public
class
Program
public
class
Program
{
{
public
static
void
Main
(
string
[]
args
)
public
static
void
Main
(
string
[]
args
)
{
{
Initialize
();
}
}
public
static
void
Initialize
(
IEnumerable
<
ServiceDescriptor
>
services
=
null
,
FullNode
fullNode
=
null
)
public
static
void
Initialize
(
IEnumerable
<
ServiceDescriptor
>
services
,
FullNode
fullNode
)
{
{
var
host
=
new
WebHostBuilder
()
var
host
=
new
WebHostBuilder
()
.
UseKestrel
()
.
UseKestrel
()
.
UseContentRoot
(
Directory
.
GetCurrentDirectory
())
.
UseContentRoot
(
Directory
.
GetCurrentDirectory
())
.
UseIISIntegration
()
.
UseIISIntegration
()
.
UseUrls
(
fullNode
.
Settings
.
ApiUri
.
ToString
())
.
ConfigureServices
(
collection
=>
.
ConfigureServices
(
collection
=>
{
{
if
(
services
==
null
||
fullNode
==
null
)
if
(
services
==
null
||
fullNode
==
null
)
...
...
Breeze/src/Breeze.Daemon/Launchers/launch bitcoin main.bat
0 → 100644
View file @
b6ca8966
cd ..
dotnet run light
\ No newline at end of file
Breeze/src/Breeze.Daemon/Launchers/launch bitcoin test.bat
0 → 100644
View file @
b6ca8966
cd..
dotnet run -testnet light
\ No newline at end of file
Breeze/src/Breeze.Daemon/Launchers/launch stratis main.bat
0 → 100644
View file @
b6ca8966
cd..
dotnet run light stratis
\ No newline at end of file
Breeze/src/Breeze.Daemon/Launchers/launch stratis test.bat
0 → 100644
View file @
b6ca8966
cd..
dotnet run -testnet light stratis addnode=13.64.76.48
\ No newline at end of file
Breeze/src/Breeze.Daemon/Program.cs
View file @
b6ca8966
...
@@ -24,6 +24,9 @@ namespace Breeze.Daemon
...
@@ -24,6 +24,9 @@ namespace Breeze.Daemon
{
{
public
class
Program
public
class
Program
{
{
private
const
string
DefaultBitcoinUri
=
"http://localhost:5000"
;
private
const
string
DefaultStratisUri
=
"http://localhost:5105"
;
public
static
void
Main
(
string
[]
args
)
public
static
void
Main
(
string
[]
args
)
{
{
IFullNodeBuilder
fullNodeBuilder
=
null
;
IFullNodeBuilder
fullNodeBuilder
=
null
;
...
@@ -31,13 +34,21 @@ namespace Breeze.Daemon
...
@@ -31,13 +34,21 @@ namespace Breeze.Daemon
// configure logging
// configure logging
Logs
.
Configure
(
Logs
.
GetLoggerFactory
(
args
));
Logs
.
Configure
(
Logs
.
GetLoggerFactory
(
args
));
// get the api uri
var
apiUri
=
args
.
SingleOrDefault
(
arg
=>
arg
.
StartsWith
(
"apiuri"
));
if
(!
string
.
IsNullOrEmpty
(
apiUri
))
{
apiUri
=
apiUri
.
Replace
(
"apiuri="
,
string
.
Empty
);
}
if
(
args
.
Contains
(
"stratis"
))
if
(
args
.
Contains
(
"stratis"
))
{
{
if
(
NodeSettings
.
PrintHelp
(
args
,
Network
.
StratisMain
))
if
(
NodeSettings
.
PrintHelp
(
args
,
Network
.
StratisMain
))
return
;
return
;
var
network
=
args
.
Contains
(
"-testnet"
)
?
InitStratisTest
()
:
Network
.
StratisMain
;
var
network
=
args
.
Contains
(
"-testnet"
)
?
InitStratisTest
()
:
Network
.
StratisMain
;
var
nodeSettings
=
NodeSettings
.
FromArguments
(
args
,
"stratis"
,
network
,
ProtocolVersion
.
ALT_PROTOCOL_VERSION
);
var
nodeSettings
=
NodeSettings
.
FromArguments
(
args
,
"stratis"
,
network
,
ProtocolVersion
.
ALT_PROTOCOL_VERSION
);
nodeSettings
.
ApiUri
=
new
Uri
(
string
.
IsNullOrEmpty
(
apiUri
)
?
DefaultStratisUri
:
apiUri
);
if
(
args
.
Contains
(
"light"
))
if
(
args
.
Contains
(
"light"
))
{
{
...
@@ -63,6 +74,7 @@ namespace Breeze.Daemon
...
@@ -63,6 +74,7 @@ namespace Breeze.Daemon
else
else
{
{
NodeSettings
nodeSettings
=
NodeSettings
.
FromArguments
(
args
);
NodeSettings
nodeSettings
=
NodeSettings
.
FromArguments
(
args
);
nodeSettings
.
ApiUri
=
new
Uri
(
string
.
IsNullOrEmpty
(
apiUri
)
?
DefaultBitcoinUri
:
apiUri
);
if
(
args
.
Contains
(
"light"
))
if
(
args
.
Contains
(
"light"
))
{
{
...
...
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