hope all is well with you. I'm currently working with a cassandra database and I'm almost done with it. Currently I am deploying my services and an error occurred. To work best with cassandra in my nestjs back-end I use the framework https://github.com/ifaim/nestjs-express-cassandra This works in the backend with the framework https://github.com/masumsoft/express-cassandra (which is actively updated and used a lot). But now the problem is that according to the documentation of datastax (where my cassandra db is hosted) I have to deposit a secureConnectBundle to be able to connect to my database.
However, I have found very little online about this and generally I find more examples of how to connect to your datastax database without secureConnectBundle than with. So far with me but without success and therefore I ask here. I really hope that I do not have to change the framework because that would probably mean the end of this project.
export const cassandraOptions: ExpressCassandraModuleOptions = {
clientOptions: {
contactPoints: [
'e68eb980-c5c3-47fa-a423-472652519805-europe-west1.db.astra.datastax.com',
],
protocolOptions: { port: 9042 },
keyspace: 'partii',
queryOptions: {
fetchSize: 100,
consistency: 1,
},
authProvider: new auth.PlainTextAuthProvider('X', 'X'),
},
ormOptions: {
createKeyspace: false,
defaultReplicationStrategy: {
class: 'SimpleStrategy',
replication_factor: 1,
},
migration: 'safe',
},
};
Its solved.