@@ -109,24 +109,24 @@ class HttpApi {
109
109
110
110
const apiAddrs = config . Addresses . API
111
111
112
- this . _apiServers = await Promise . resolve (
112
+ this . _apiServer = await Promise . resolve (
113
113
serverCreator . apply ( this , [ apiAddrs , this . _createApiServer , hapiInfoToMultiaddr , ipfs ] )
114
114
)
115
115
// for the CLI to know the where abouts of the API
116
- await promisify ( ipfs . _repo . apiAddr . set ) ( this . _apiServers [ 0 ] . info . ma )
116
+ await promisify ( ipfs . _repo . apiAddr . set ) ( this . _apiServer [ 0 ] . info . ma )
117
117
118
118
const gatewayAddr = config . Addresses . Gateway
119
119
120
120
this . _gatewayServer = await Promise . resolve (
121
121
serverCreator . apply ( this , [ gatewayAddr , this . _createGatewayServer , hapiInfoToMultiaddr , ipfs ] )
122
122
)
123
- this . _apiServers . forEach ( apiServer => {
123
+ this . _apiServer . forEach ( apiServer => {
124
124
ipfs . _print ( 'API listening on %s' , apiServer . info . ma )
125
125
} )
126
126
this . _gatewayServer . forEach ( gatewayServer => {
127
127
ipfs . _print ( 'Gateway (read only) listening on %s' , gatewayServer . info . ma )
128
128
} )
129
- this . _apiServers . forEach ( apiServer => {
129
+ this . _apiServer . forEach ( apiServer => {
130
130
ipfs . _print ( 'Web UI available at %s' , toUri ( apiServer . info . ma ) + '/webui' )
131
131
} )
132
132
this . _log ( 'started' )
@@ -199,7 +199,7 @@ class HttpApi {
199
199
200
200
get apiAddr ( ) {
201
201
if ( ! this . _apiServer ) throw new Error ( 'API address unavailable - server is not started' )
202
- return multiaddr ( '/ip4/127.0.0.1/tcp/' + this . _apiServers [ 0 ] . info . port )
202
+ return multiaddr ( '/ip4/127.0.0.1/tcp/' + this . _apiServer [ 0 ] . info . port )
203
203
}
204
204
205
205
async stop ( ) {
0 commit comments