<commit_before>var path = require('path');

var url = process.env.DATABASE_URL.match(/(.*)\:\/\/(.*?)\:(.*)@(.*)\:(.*)\/(.*)/);
var bd_name = (url[6] || null);
var user = (url[2] || null);
var pdw = (url[3] || null);
var protocol = (url[1] || null);
var dialect = (url[1] || null);
var port = (url[5] || null);
var host = (url[4] || null);
var storage = process.env.DATABASE_STORAGE;

//Carga modelo ORM
var sequelize = require('sequelize');

//Usa BD SQLite
var seq = new sequelize(
  bd_name,
  user,
  pdw,
  { dialect: protocol,
    protocol: protocol,
    port: port,
    host: host,
    storage: storage, //Solo en SQLite (.env)
    omitNull: true //Solo en Postges (heroku)
  }
);

//Importa la definición de la tabla Quiz en quiz.js
var Quiz = seq.import(path.join(__dirname, 'quiz'));
<commit_msg>Se crea la funcionalidad para buscar preguntas<commit_after>var path = require('path');

var url = process.env.DATABASE_URL.match(/(.*)\:\/\/(.*?)\:(.*)@(.*)\:(.*)\/(.*)/);
var bd_name = (url[6] || null);
var user = (url[2] || null);
var pdw = (url[3] || null);
var protocol = (url[1] || null);
var dialect = (url[1] || null);
var port = (url[5] || null);
var host = (url[4] || null);
var storage = process.env.DATABASE_STORAGE;
console.log(url);
//Carga modelo ORM
var sequelize = require('sequelize');

//Usa BD SQLite
var seq = new sequelize(
  bd_name,
  user,
  pdw,
  { dialect: protocol,
    protocol: protocol,
    port: port,
    host: host,
    storage: storage, //Solo en SQLite (.env)
    omitNull: true //Solo en Postges (heroku)
  }
);

//Importa la definición de la tabla Quiz en quiz.js
var Quiz = seq.import(path.join(__dirname, 'quiz'));

{'fraction_non_alphanumeric': 0.20577617328519857, 'fraction_numerical': 0.00842358604091456, 'mean_word_length': 3.5437158469945356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5784255', 'n_tokens_mistral': 663, 'n_tokens_neox': 638, 'n_words': 179}