Initial commit

This commit is contained in:
2025-12-07 14:32:46 +00:00
commit 0a0969b8af
4726 changed files with 536089 additions and 0 deletions

15
db.js Executable file
View File

@@ -0,0 +1,15 @@
// ./db.js
require('dotenv').config();
const knex = require('knex');
const knexfile = require('./knexfile');
// Pega o ambiente (default pra 'development')
const environment = process.env.NODE_ENV || 'development';
// Recupera só as configurações daquele ambiente
const config = knexfile[environment];
// Inicializa o Knex com esse config
const db = knex(config);
module.exports = db;