Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you configure an emailAdapter for parse-server?

I'm trying to test out the password reset flow on a locally running parse-server instance. Every time I send a password reset request I get the following error error: Uncaught internal server error. Trying to send a reset password but no adapter is set undefined. I know I'm supposed to configure the emailAdapter in cli-definitions but I'm not too sure what exactly I'm supposed to put there. I tried changing the contructor in ParseServer.js to have

    emailAdapter: {
    module: 'parse-server-simple-mailgun-adapter',
    options: {
      // The address that your emails come from
      fromAddress: '[email protected]',
      // Your domain from mailgun.com
      domain: 'example.com',
      // Your API key from mailgun.com
      apiKey: 'key-mykey',
    }
  }

but that did not work. Any help is greatly appreciated!

like image 650
amsub24 Avatar asked Apr 17 '16 00:04

amsub24


People also ask

How do I run a dashboard parse?

Install the dashboard from npm . You may set the host, port and mount path by supplying the --host , --port and --mountPath options to parse-dashboard. You can use anything you want as the app name, or leave it out in which case the app ID will be used. The --dev parameter disables production-ready security features.

What is a parse Server?

Parse Server is an open source backend that can be deployed to any infrastructure that can run Node. js. You can find the source on the GitHub repo. Parse Server uses MongoDB or PostgreSQL as a database. You can deploy and run Parse Server on your own infrastructure.

What is parse Server Back4app?

Parse Server is an open source Backend-as-a-Service(BaaS) framework initially developed by Facebook. The platform now has an active and robust community of fanatical developers who constantly innovate and strive to improve the already impressive and modular platform.


1 Answers

Just got this configured myself and I think you may just be missing a few parameters.

In the configuration in your index.js or other file where ParseServer is being initialized, you need all of the following:

 verifyUserEmails: true,
 // Same as the SERVER_URL used to configure ParseServer, in my case it uses Heroku
 publicServerURL: 'http://MY_HEROKU_APP.herokuapp.com/parse', 
 appName: 'MY_APP',
 emailAdapter: {
    module: 'parse-server-simple-mailgun-adapter',
    options: {
      fromAddress: '[email protected]',
      domain: 'example.com',
      apiKey: 'key-XXXXXX',
    }
 }
like image 179
James Greenhalgh Avatar answered Nov 15 '22 03:11

James Greenhalgh