Guest User

Untitled

a guest
Mar 4th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. const connectionSettings = {
  2. client: 'mysql2',
  3. connection: {
  4. host: '127.0.0.1',
  5. user: 'mysql',
  6. password: 'mysql',
  7. database: 'db'
  8. }
  9. };
  10.  
  11. const migrations = {
  12. directory: path.resolve(__dirname, 'back/database/migrations'),
  13. tableName: 'knex_migrations',
  14. };
  15.  
  16. const development = Object.assign(connectionSettings, {
  17. migrations,
  18. seeds: {
  19. directory: path.resolve(__dirname, 'back/database/seeds/development')
  20. }
  21. });
  22.  
  23. console.log(development.seeds.directory); // ?
  24.  
  25. const production = Object.assign(connectionSettings, {
  26. migrations,
  27. seeds: {
  28. directory: path.resolve(__dirname, 'back/database/seeds/production')
  29. }
  30. });
  31.  
  32. console.log(development.seeds.directory); // ?
Add Comment
Please, Sign In to add comment