// tslint:disable:no-console
import * as mongoose from 'mongoose';

import { chevre } from '../../../lib/index';

// tslint:disable-next-line:max-func-body-length
async function main() {
    await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });

    const jwtSettingRepo = await chevre.repository.setting.JWT.createInstance(mongoose.connection);

    const result = await jwtSettingRepo.findDefault();
    // tslint:disable-next-line:no-null-keyword
    console.dir(result, { depth: null });
}

main()
    .then(console.log)
    .catch(console.error);
