datastores.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * Datastores
  3. * (sails.config.datastores)
  4. *
  5. * A set of datastore configurations which tell Sails where to fetch or save
  6. * data when you execute built-in model methods like `.find()` and `.create()`.
  7. *
  8. * > This file is mainly useful for configuring your development database,
  9. * > as well as any additional one-off databases used by individual models.
  10. * > Ready to go live? Head towards `config/env/production.js`.
  11. *
  12. * For more information on configuring datastores, check out:
  13. * https://sailsjs.com/config/datastores
  14. */
  15. module.exports.datastores = {
  16. /***************************************************************************
  17. * *
  18. * Your app's default datastore. *
  19. * *
  20. * Sails apps read and write to local disk by default, using a built-in *
  21. * database adapter called `sails-disk`. This feature is purely for *
  22. * convenience during development; since `sails-disk` is not designed for *
  23. * use in a production environment. *
  24. * *
  25. * To use a different db _in development_, follow the directions below. *
  26. * Otherwise, just leave the default datastore as-is, with no `adapter`. *
  27. * *
  28. * (For production configuration, see `config/env/production.js`.) *
  29. * *
  30. ***************************************************************************/
  31. default: {
  32. /***************************************************************************
  33. * *
  34. * Want to use a different database during development? *
  35. * *
  36. * 1. Choose an adapter: *
  37. * https://sailsjs.com/plugins/databases *
  38. * *
  39. * 2. Install it as a dependency of your Sails app. *
  40. * (For example: npm install sails-mysql --save) *
  41. * *
  42. * 3. Then pass it in, along with a connection URL. *
  43. * (See https://sailsjs.com/config/datastores for help.) *
  44. * *
  45. ***************************************************************************/
  46. // adapter: 'sails-mysql',
  47. // url: 'mysql://user:password@host:port/database',
  48. },
  49. };