bhatt-shashwat

connection.js

Apr 2nd, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Connections
  3.  * (sails.config.connections)
  4.  *
  5.  * `Connections` are like "saved settings" for your adapters.  What's the difference between
  6.  * a connection and an adapter, you might ask?  An adapter (e.g. `sails-mysql`) is generic--
  7.  * it needs some additional information to work (e.g. your database host, password, user, etc.)
  8.  * A `connection` is that additional information.
  9.  *
  10.  * Each model must have a `connection` property (a string) which is references the name of one
  11.  * of these connections.  If it doesn't, the default `connection` configured in `config/models.js`
  12.  * will be applied.  Of course, a connection can (and usually is) shared by multiple models.
  13.  * .
  14.  * Note: If you're using version control, you should put your passwords/api keys
  15.  * in `config/local.js`, environment variables, or use another strategy.
  16.  * (this is to prevent you inadvertently sensitive credentials up to your repository.)
  17.  *
  18.  * For more information on configuration, check out:
  19.  * http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.connections.html
  20.  */
  21.  
  22. module.exports.connections = {
  23.  
  24.   /***************************************************************************
  25.   *                                                                          *
  26.   * Local disk storage for DEVELOPMENT ONLY                                  *
  27.   *                                                                          *
  28.   * Installed by default.                                                    *
  29.   *                                                                          *
  30.   ***************************************************************************/
  31.   localDiskDb: {
  32.     adapter: 'sails-disk'
  33.   },
  34.  
  35.   /***************************************************************************
  36.   *                                                                          *
  37.   * MySQL is the world's most popular relational database.                   *
  38.   * http://en.wikipedia.org/wiki/MySQL                                       *
  39.   *                                                                          *
  40.   * Run: npm install sails-mysql                                             *
  41.   *                                                                          *
  42.   ***************************************************************************/
  43.   gridleMysqlServer: {
  44.     adapter: 'sails-mysql',
  45.     host: 'localhost',
  46.     user: 'root',
  47.     password: '1234',
  48.     database: 'gridle_master'
  49.   },
  50.  
  51.   /***************************************************************************
  52.   *                                                                          *
  53.   * MongoDB is the leading NoSQL database.                                   *
  54.   * http://en.wikipedia.org/wiki/MongoDB                                     *
  55.   *                                                                          *
  56.   * Run: npm install sails-mongo                                             *
  57.   *                                                                          *
  58.   ***************************************************************************/
  59.   gridleMongodbServer: {
  60.     adapter: 'sails-mongo',
  61.     host: 'localhost',
  62.     port: 27017,
  63.     // user: 'username',
  64.     // password: 'password',
  65.     database: 'chat-gridle'
  66.   },
  67.  
  68.   archivedDataMongoServer: {
  69.     adapter: 'sails-mongo',
  70.     host: 'localhost',
  71.     port: 27017,
  72.     // user: 'username',
  73.     // password: 'password',
  74.     database: 'chat-gridle-archived'
  75.   },
  76.  
  77.   gridleRedisServer: {
  78.     adapter: 'sails-redis',
  79.     host: 'localhost',
  80.     port: 6379,
  81.     database: 0
  82.   },
  83.  
  84.   /***************************************************************************
  85.   *                                                                          *
  86.   * PostgreSQL is another officially supported relational database.          *
  87.   * http://en.wikipedia.org/wiki/PostgreSQL                                  *
  88.   *                                                                          *
  89.   * Run: npm install sails-postgresql                                        *
  90.   *                                                                          *
  91.   *                                                                          *
  92.   ***************************************************************************/
  93.   // somePostgresqlServer: {
  94.   //   adapter: 'sails-postgresql',
  95.   //   host: 'YOUR_POSTGRES_SERVER_HOSTNAME_OR_IP_ADDRESS',
  96.   //   user: 'YOUR_POSTGRES_USER',
  97.   //   password: 'YOUR_POSTGRES_PASSWORD',
  98.   //   database: 'YOUR_POSTGRES_DB'
  99.   // }
  100.  
  101.  
  102.   /***************************************************************************
  103.   *                                                                          *
  104.   * More adapters: https://github.com/balderdashy/sails                      *
  105.   *                                                                          *
  106.   ***************************************************************************/
  107.  
  108. };
Add Comment
Please, Sign In to add comment