How to use the sails.config function in sails

To help you get started, we’ve selected a few sails examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github meltyshev / planka / server / config / env / production.js View on Github external
// ssl: undefined,

  /**
   *
   * Production overrides for any custom settings specific to your app.
   * (for example, production credentials for 3rd party APIs like Stripe)
   *
   * > See config/custom.js for more info on how to configure these options.
   *
   */

  custom: {
    baseUrl: process.env.BASE_URL,

    uploadsPath: path.join(sails.config.paths.public, 'uploads'),
    uploadsUrl: `${process.env.BASE_URL}/uploads`,
  },
};
github ragulka / sails-starter-app / test / bootstrap.js View on Github external
function dropDb(cb) {
  createConnection( sails.config.adapters.mongo, function (err, db) {
    db.dropDatabase(function () {
      cb();
    });
  });
}
github meltyshev / planka / server / config / custom.js View on Github external
* https://sailsjs.com/config/custom
 */

const path = require('path');
const sails = require('sails');

module.exports.custom = {
  /**
   *
   * Any other custom config this Sails app should use during development.
   *
   */

  baseUrl: process.env.BASE_URL,

  uploadsPath: path.join(sails.config.paths.public, 'uploads'),
  uploadsUrl: `${process.env.BASE_URL}/uploads`,
};