Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goshimmer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iota-imt
goshimmer
Commits
d08572be
Commit
d08572be
authored
5 years ago
by
Luca Moser
Browse files
Options
Downloads
Patches
Plain Diff
adds bind address parameter for the web api
parent
f1cb9270
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
config.json
+4
-1
4 additions, 1 deletion
config.json
plugins/webapi/parameters.go
+13
-0
13 additions, 0 deletions
plugins/webapi/parameters.go
plugins/webapi/plugin.go
+2
-1
2 additions, 1 deletion
plugins/webapi/plugin.go
with
19 additions
and
2 deletions
config.json
+
4
−
1
View file @
d08572be
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
"entrynodes"
:
[
"entrynodes"
:
[
"V8LYtWWcPYYDTTXLeIEFjJEuWlsjDiI0+Pq/Cx9ai6g=@116.202.49.178:14626"
"V8LYtWWcPYYDTTXLeIEFjJEuWlsjDiI0+Pq/Cx9ai6g=@116.202.49.178:14626"
],
],
"port"
:
14626
"port"
:
14626
},
},
"database"
:
{
"database"
:
{
"directory"
:
"mainnetdb"
"directory"
:
"mainnetdb"
...
@@ -16,6 +16,9 @@
...
@@ -16,6 +16,9 @@
"gossip"
:
{
"gossip"
:
{
"port"
:
14666
"port"
:
14666
},
},
"webapi"
:
{
"bindAddress"
:
"0.0.0.0:8080"
},
"graph"
:
{
"graph"
:
{
"webrootPath"
:
"./IOTAtangle/webroot"
,
"webrootPath"
:
"./IOTAtangle/webroot"
,
"socketioPath"
:
"./socket.io-client/dist/socket.io.js"
,
"socketioPath"
:
"./socket.io-client/dist/socket.io.js"
,
...
...
This diff is collapsed.
Click to expand it.
plugins/webapi/parameters.go
0 → 100644
+
13
−
0
View file @
d08572be
package
webapi
import
(
flag
"github.com/spf13/pflag"
)
const
(
BIND_ADDRESS
=
"webapi.bindAddress"
)
func
init
()
{
flag
.
String
(
BIND_ADDRESS
,
"0.0.0.0:8080"
,
"the bind address for the web API"
)
}
This diff is collapsed.
Click to expand it.
plugins/webapi/plugin.go
+
2
−
1
View file @
d08572be
...
@@ -4,6 +4,7 @@ import (
...
@@ -4,6 +4,7 @@ import (
"context"
"context"
"time"
"time"
"github.com/iotaledger/goshimmer/packages/parameter"
"github.com/iotaledger/goshimmer/packages/shutdown"
"github.com/iotaledger/goshimmer/packages/shutdown"
"github.com/iotaledger/hive.go/daemon"
"github.com/iotaledger/hive.go/daemon"
"github.com/iotaledger/hive.go/logger"
"github.com/iotaledger/hive.go/logger"
...
@@ -30,7 +31,7 @@ func run(plugin *node.Plugin) {
...
@@ -30,7 +31,7 @@ func run(plugin *node.Plugin) {
log
.
Info
(
"Starting Web Server ... done"
)
log
.
Info
(
"Starting Web Server ... done"
)
go
func
()
{
go
func
()
{
if
err
:=
Server
.
Start
(
":8080"
);
err
!=
nil
{
if
err
:=
Server
.
Start
(
parameter
.
NodeConfig
.
GetString
(
BIND_ADDRESS
)
);
err
!=
nil
{
log
.
Info
(
"Stopping Web Server ... done"
)
log
.
Info
(
"Stopping Web Server ... done"
)
}
}
}()
}()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment