Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function (app) {
const connectionInfo = app.get('<%= database %>');
const models = ExpressCassandra.createClient(connectionInfo);
const cassandraClient = models.orm.get_system_client();
app.set('models', models);
cassandraClient.connect(err => {
if (err) throw err;
const cassanknex = require('cassanknex')({ connection: cassandraClient });
FeathersCassandra.cassanknex(cassanknex);
cassanknex.on('ready', err => {
if (err) throw err;
});
app.set('cassanknex', cassanknex);
export default function (app: Application) {
const connectionInfo = app.get('<%= database %>');
const models = ExpressCassandra.createClient(connectionInfo);
const cassandraClient = models.orm.get_system_client();
app.set('models', models);
cassandraClient.connect((err: any) => {
if (err) throw err;
const cassanknex = require('cassanknex')({ connection: cassandraClient });
FeathersCassandra.cassanknex(cassanknex);
cassanknex.on('ready', (err: any) => {
if (err) throw err;
});
app.set('cassanknex', cassanknex);