Guest User

Untitled

a guest
Dec 7th, 2017
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. // config/env/production.js
  2.  
  3. module.exports = {
  4. connection: 'mongo_production'
  5. };
  6.  
  7. // config/models.js
  8.  
  9. module.exports.models = {
  10. // connection: 'localDiskDb'
  11. };
  12.  
  13. // config/connections.js
  14.  
  15. module.exports.connections = {
  16. mongo_development: {
  17. adapter: 'sails-mongo',
  18. host: 'localhost',
  19. port: 27017,
  20. user: '',
  21. password: '',
  22. database: 'my_local_db'
  23. },
  24.  
  25. mongo_production: {
  26. adapter: 'sails-mongo',
  27. url: 'mongodb://me:mypw@foobar.mongohq.com:10052/my_production_db'
  28. }
  29. };
  30.  
  31. module.exports = {
  32. models: {
  33. connection: 'mongo_production'
  34. }
  35. };
  36.  
  37. module.exports = {
  38. // port: process.env.PORT || 1337, // comment this line if you want to set the different ports for different modes
  39. environment: process.env.NODE_ENV || 'development'
  40. };
  41.  
  42. module.exports = {
  43. port: 8080, // will change from default port 1337 to 8080
  44. models: {
  45. connection: 'developement_db',
  46. migrate: 'alter'
  47. }
  48. };
  49.  
  50. module.exports = {
  51. port: 9090, // will change from default port 1337 to 9090
  52. models: {
  53. connection: 'production_db',
  54. migrate: 'safe'
  55. }
  56. };
Add Comment
Please, Sign In to add comment