From 4cb667456228418e4df6cc67992fd54c629b281f Mon Sep 17 00:00:00 2001 From: April Hall Date: Wed, 8 Jan 2025 18:04:56 -0500 Subject: [PATCH] fix: Prevent server from throwing error on uninitialized database --- src/lib/server/db/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/server/db/index.ts b/src/lib/server/db/index.ts index 010cd15..994d0a4 100644 --- a/src/lib/server/db/index.ts +++ b/src/lib/server/db/index.ts @@ -3,11 +3,10 @@ import cassandra from 'cassandra-driver'; const client = new cassandra.Client({ contactPoints: ['localhost'], localDataCenter: 'datacenter1', - keyspace: 'users', }); // Connect to Cassandra/ScyllaDB and create -// necessary tables, keyspaces, etc +// the necessary tables, keyspaces, etc. await client.connect(); await client.execute(`CREATE KEYSPACE IF NOT EXISTS users WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1};`); await client.execute(`CREATE KEYSPACE IF NOT EXISTS channels WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1};`);