Refactor
This commit is contained in:
13
server/sequelize.js
Normal file
13
server/sequelize.js
Normal file
@ -0,0 +1,13 @@
|
||||
import Sequelize from 'sequelize';
|
||||
import EncryptedField from 'sequelize-encrypted';
|
||||
import debug from 'debug';
|
||||
|
||||
const secretKey = process.env.SEQUELIZE_SECRET;
|
||||
export const encryptedFields = EncryptedField(Sequelize, secretKey);
|
||||
|
||||
export const DataTypes = Sequelize;
|
||||
|
||||
export const sequelize = new Sequelize(process.env.DATABASE_URL, {
|
||||
logging: debug('sql'),
|
||||
typeValidation: true,
|
||||
});
|
Reference in New Issue
Block a user