Cordite client attempts to connect the api on 8081 by default but the container runs on 8080 by default.
Steps to reproduce.
- $ docker run -p 8080:8080 -p 10002:10002 cordite/cordite
- $ sudo npm install -g cordite-cli
- $ cordite
Error:
$ cordite
_____ ___ __
/ ___/__ _______/ (_) /____
/ /__/ _ \/ __/ _ / / __/ -_)
\___/\___/_/ \_,_/_/\__/\__/
connecting to https://localhost:8081/api/
could not connect { Error: connect ECONNREFUSED 127.0.0.1:8081
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
code: 'ECONNREFUSED',
errno: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 8081,
url: 'https://localhost:8081/api/' }
It looks like the following files need to be updated.
[sbadakhc@lap01phy01 cordite-cli]$ grep -r 8081 *
cordite.js:var url = 'https://localhost:8081/api/';
cordite.js: console.log(' cordite https://localhost:8081');
cordite-screen.rc:screen -t node1 ./target/osx-x64/cordite https://localhost:8081
node_modules/sockjs-client/README.md: * ws://localhost:8081/echo/websocket
node_modules/dom-walk/example/static/index.html: <script src="http://localhost:8081"></script>
Edited by Salim Badakhchani