How can I connect Apache Cassandra to NodeJS One-Click Application Images?

May 24, 2016 3.6k views
Node.js NoSQL

Hi All,

I have two droplets.
Droplet 1: Cassandra on 14.04
Droplet 2: node v4.4.3 on 14.04

I have configured Cassandra as per this article:

I have installed the express-cassandra npm driver on droplet 2. (

The problem I face is that Droplet one has password authentication but there is absolutely no mention of user/pass auth for express-cassandra.

Can anyone point me in the right direction?

1 Answer

Looking over the docs I found this that seems to answer your question:

For connecting to cassandra using authentication, you can use the nodejs-driver authProvider option in the clientOptions object like the following:

clientOptions: {
    contactPoints: [''],
    protocolOptions: { port: 9042 },
    keyspace: 'mykeyspace',
    queryOptions: {consistency:},
    authProvider: new models.driver.auth.PlainTextAuthProvider('my_user', 'my_password')
  • Thanks, I actually asked the developers today and they literally just updated the docs to show that. I was going to add that here.

    Thanks for looking.

Have another answer? Share your knowledge.