By Brooky
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: https://www.digitalocean.com/community/tutorials/how-to-use-the-apache-cassandra-one-click-application-image
I have installed the express-cassandra npm driver on droplet 2. (https://www.npmjs.com/package/express-cassandra).
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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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: ['127.0.0.1'],
protocolOptions: { port: 9042 },
keyspace: 'mykeyspace',
queryOptions: {consistency: models.consistencies.one},
authProvider: new models.driver.auth.PlainTextAuthProvider('my_user', 'my_password')
}
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.