Linking two containers?

Hi guys, I have an cassandra container and an nodejs + cassandra microservice image in Docker.

I want to link these two containers, so after running poklet/cassandra image with conatiner name cassandra-3, for linking I used command,
docker run -it -p 9000:8080 --link cassandra-3:cass siddharth67/nodejs_cassandra ./bin/bash

But after running my service, it is not able to connect to the cassandra DB.
Cassandra driver was not able to connect to Error: All host(s) tried for query failed. First host tried, Error: connect ECONNREFUSED. See innErrors.

The port 9042 is exposed.

Any help is appreciated.

Adding a link like this will add a host file entry to your nodejs app container called “cass” so it looks like you just need to update your nodejs config to connect to Cassandra using the host name “cass” on normal port 9042

Thanks timgriffiths, in my node application the host was where as the pokle/cassandra env variable host was
After changing the host value. Linking was perfect.