need to replace localhost:3000 with realip:3000 in composer-rest-server

隐身守侯 提交于 2019-12-02 01:58:07

问题


I have uploaded the composer-rest-server on AWS machine , i have managed to launch without errors the composer-rest-server , although it always refer to http://localhost:3000 , i want to change my localhost to my actual host ip on AWS

can someone help ?


回答1:


You need to make your REST server available on an IP or domain resolvable hostname ie on an available network interface such that other REST clients can consume it.

Its likely your REST server (accessed through Explorer) is already listening on 0.0.0.0:3000 and hence listening on all configured interfaces (on your server). For REST server deployment more info here -> https://hyperledger.github.io/composer/integrating/deploying-the-rest-server.html

the parameter in your COMPOSER_DATASOURCES to change (if you need to change it) is here (straight out of loopback basically):

 COMPOSER_DATASOURCES='{
  "db": {
    "name": "db",
    "connector": "mongodb",
    "host": "mongo",
    "ip": "10.99.98.x"
  }
}'

referenced here -> https://hyperledger.github.io/composer/integrating/deploying-the-rest-server.html



来源:https://stackoverflow.com/questions/47179869/need-to-replace-localhost3000-with-realip3000-in-composer-rest-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!