问题描述
我已将composer-rest-server上传到AWS机器上,尽管它始终引用 http://localhost:3000 ,我想将localhost更改为AWS上的实际主机ip
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
有人可以帮忙吗?
推荐答案
您需要使REST服务器在IP或域可解析的主机名上可用,即在可用的网络接口上可用,以便其他REST客户端可以使用它.
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.
您的REST服务器(通过资源管理器访问)很可能已经在侦听0.0.0.0:3000,因此正在侦听所有已配置的接口(在您的服务器上).有关REST服务器部署的更多信息,请点击此处-> https://hyperledger .github.io/composer/integrating/deploying-the-rest-server.html
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
COMPOSER_DATASOURCES中要更改(如果需要更改)的参数在此处(基本上不回送):
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"
}
}'
此处引用-> https://hyperledger.github .io/composer/integrating/deploying-the-rest-server.html
这篇关于需要在composer-rest-server中用realip:3000替换localhost:3000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!