-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document email adapter #1144
Document email adapter #1144
Conversation
@drew-gross updated the pull request. |
appName: 'Parse App', | ||
// The email adapter | ||
emailAdapter: { | ||
module: 'parse-server/lib/Adapters/Email/SimpleMailgunAdapter', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is so really ugly :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Thoughts on splitting it out into it's own npm package? Then we would have no email adapters in parse-server
package which has upsides and downsides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could have it as a dependency. With our adapter loader, we need The full module. Can't handle variables which can be problematic too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be consistent for all adapters actually. And with npm a parse-server dep don't get exposed to the main package...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep have it as a dep then just have
emailAdapter: {
module: "parse-server-simple-mailgun-adapter",
options: {...}
}
And it will just work, and if you want to use a different email adapter you just have to add it to your package.json
. We can do this for all adapters. For variables you can just require it explicitly and provide an instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, let's do 1 repo with all the adapter source and n package.json. What do you think?
Maybe keep the source in parse-server but in a separate folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would 1 repo with all the adapters work for requiring? Then you can't use the initialization syntax I described above.
Keeping the source in parse-server
seems messy if it's in a different npm package. One to one mapping between repos and packages seems like the only sane solution to me.
Current coverage is
|
8c39394
to
73aad10
Compare
@drew-gross updated the pull request. |
73aad10
to
03177f9
Compare
@drew-gross updated the pull request. |
2c397a4
to
ecf65ba
Compare
@drew-gross updated the pull request. |
LOVE IT! |
ecf65ba
to
b4ee313
Compare
Rebased |
@drew-gross updated the pull request. |
Don't you wanna call it parse-server-MailGun-adapter? |
I put simple in so that Mailgun could make an official one if they want. |
@drew-gross updated the pull request. |
Lets document this and get it out of experimental. We really shouldn't let features be experimental for too long.