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
166f4ab9
Commit
166f4ab9
authored
Jun 20, 2017
by
Jeremy Bokobza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added api uri that can be passed by the cli
parent
049e63f6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
7 deletions
+27
-7
Program.cs
Breeze/src/Breeze.Api/Program.cs
+6
-6
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 @
166f4ab9
...
@@ -10,15 +10,15 @@ namespace Breeze.Api
...
@@ -10,15 +10,15 @@ namespace Breeze.Api
{
{
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 @
166f4ab9
cd ..
dotnet run light
\ No newline at end of file
Breeze/src/Breeze.Daemon/Launchers/launch bitcoin test.bat
0 → 100644
View file @
166f4ab9
cd..
dotnet run -testnet light
\ No newline at end of file
Breeze/src/Breeze.Daemon/Launchers/launch stratis main.bat
0 → 100644
View file @
166f4ab9
cd..
dotnet run light stratis
\ No newline at end of file
Breeze/src/Breeze.Daemon/Launchers/launch stratis test.bat
0 → 100644
View file @
166f4ab9
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 @
166f4ab9
...
@@ -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,6 +34,13 @@ namespace Breeze.Daemon
...
@@ -31,6 +34,13 @@ 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
))
...
@@ -38,6 +48,7 @@ namespace Breeze.Daemon
...
@@ -38,6 +48,7 @@ namespace Breeze.Daemon
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