* Initial migration * Cleanup and create migration scripts * Introduce test suite * Fix test issues * Correct CORS issue and update paths * Update README
42 lines
No EOL
954 B
JavaScript
42 lines
No EOL
954 B
JavaScript
require('dotenv').config();
|
|
const path = require('path');
|
|
|
|
const dbPath = process.env.DATABASE_URL
|
|
? process.env.DATABASE_URL.replace('sqlite:///', '')
|
|
: path.join(__dirname, '..', 'db');
|
|
|
|
module.exports = {
|
|
development: {
|
|
dialect: 'sqlite',
|
|
storage: path.join(dbPath, 'development.sqlite3'),
|
|
logging: console.log,
|
|
define: {
|
|
timestamps: true,
|
|
underscored: true,
|
|
createdAt: 'created_at',
|
|
updatedAt: 'updated_at'
|
|
}
|
|
},
|
|
test: {
|
|
dialect: 'sqlite',
|
|
storage: path.join(dbPath, 'test.sqlite3'),
|
|
logging: false,
|
|
define: {
|
|
timestamps: true,
|
|
underscored: true,
|
|
createdAt: 'created_at',
|
|
updatedAt: 'updated_at'
|
|
}
|
|
},
|
|
production: {
|
|
dialect: 'sqlite',
|
|
storage: path.join(dbPath, 'production.sqlite3'),
|
|
logging: false,
|
|
define: {
|
|
timestamps: true,
|
|
underscored: true,
|
|
createdAt: 'created_at',
|
|
updatedAt: 'updated_at'
|
|
}
|
|
}
|
|
}; |