Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const connectionSettings = {
- client: 'mysql2',
- connection: {
- host: '127.0.0.1',
- user: 'mysql',
- password: 'mysql',
- database: 'db'
- }
- };
- const migrations = {
- directory: path.resolve(__dirname, 'back/database/migrations'),
- tableName: 'knex_migrations',
- };
- const development = Object.assign(connectionSettings, {
- migrations,
- seeds: {
- directory: path.resolve(__dirname, 'back/database/seeds/development')
- }
- });
- console.log(development.seeds.directory); // ?
- const production = Object.assign(connectionSettings, {
- migrations,
- seeds: {
- directory: path.resolve(__dirname, 'back/database/seeds/production')
- }
- });
- console.log(development.seeds.directory); // ?
Add Comment
Please, Sign In to add comment