parse-community / parse-server

Parse Server for Node.js / Express
https://parseplatform.org
Apache License 2.0
20.95k stars 4.78k forks source link

infrastructure for service providers implementation #197

Closed lucianmat closed 8 years ago

lucianmat commented 8 years ago

Would make sense to have a generic support in ParseServer for communication services, like mailgun, twillio,etc, based on generic configuration infrastructure parameters ?

like :

var api = new ParseServer({
  databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
  cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
  appId: process.env.APP_ID || 'myAppId',
  masterKey: process.env.MASTER_KEY || 'myMasterKey',
  providers : {
       mailGun : {
            service: 'mailgun',
            apiKey: process.env.MAILGUN_API_KEY || 'mg-MYMAILGUNKEY',
            domain: process.env.MAILGUN_DOMAIN || 'mymailgundomain@mailgun.org',
            fromAddress: process.env.MAIL_FROM_ADDRESS || 'My App <myapp@domain.com>' 
       },
      twillio : {
      }
    }
});

Instead of hardcoding providers into ParseServer (index.js) ?

gfosco commented 8 years ago

Looks like we're headed in that direction... will close this, please call out anything you have a problem with in a new issue. thanks. :+1: