Guest User

Untitled

a guest
Mar 8th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. const Sequelize = require('sequelize');
  2.  
  3.  
  4. const config = {
  5. user: "root",
  6. database: "api",
  7. password: "",
  8. host: "localhost",
  9. port: 3306,
  10. dialect: 'mysql',
  11. max: 10000,
  12. idleTimeoutMillis: 3000
  13. };
  14.  
  15. const seq = new Sequelize(
  16. config.database,
  17. config.user,
  18. config.password,
  19. {
  20. host:config.host,
  21. dialect:config.dialect,
  22. port:config.port,
  23. logging: false,
  24. pool: {
  25. max: config.max,
  26. min: 0,
  27. idle: config.idleTimeoutMillis
  28. }
  29. }
  30. );
  31.  
  32. module.exports = seq
  33.  
  34. const Sequelize = require('sequelize');
  35.  
  36.  
  37. const config = {
  38. user: "sa",
  39. database: "dbPortal",
  40. password: "",
  41. host: "localhost",
  42. port: 1433,
  43. dialect: 'mssql',
  44. max: 10000,
  45. idleTimeoutMillis: 3000
  46. };
  47.  
  48. const seq = new Sequelize(
  49. config.database,
  50. config.user,
  51. config.password,
  52. {
  53. host:config.host,
  54. dialect:config.dialect,
  55. port:config.port,
  56. logging: false,
  57. pool: {
  58. max: config.max,
  59. min: 0,
  60. idle: config.idleTimeoutMillis
  61. }
  62. }
  63. );
  64.  
  65. module.exports = seq
Add Comment
Please, Sign In to add comment