먼저, AWS Elastic Beanstalk에서 구문 분석 서버를 실행하고 있습니다.구문 분석 서버 메일 메일 어댑터 설치
나는이 비록 나를 위해 충분히 말하지 않는다 readme 파일
##### Email verification and password reset
Verifying user email addresses and enabling password reset via email requries an email adapter. As part of the `parse-server` package we provide an adapter for sending email through Mailgun. To use it, sign up for Mailgun, and add this to your initialization code:
```js
var server = ParseServer({
...otherOptions,
// Enable email verification
verifyUserEmails: true,
// set preventLoginWithUnverifiedEmail to false to allow user to login without verifying their email
// set preventLoginWithUnverifiedEmail to true to prevent user from login if their email is not verified
preventLoginWithUnverifiedEmail: false, // defaults to false
// The public URL of your app.
// This will appear in the link that is used to verify email addresses and reset passwords.
// Set the mount path as it is in serverURL
publicServerURL: 'https://example.com/parse',
// Your apps name. This will appear in the subject and body of the emails that are sent.
appName: 'Parse App',
// The email adapter
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',
}
}
});
이 설명서를 참조하십시오. 기존의 익스프레스 웹 사이트를 사용하고 있지 않으며 저장소에 우편 건 코드를 추가 할 위치를 알아야합니다.
나는 이미 mailgun을 가지고 있으며 PHP에서 사용했으며 사용자 암호를 재설정하기 위해 이것을 명시 적으로 사용하고 있습니다.
그래서 다시 구문 분석 서버 폴더의 어떤 파일에 메일 건 어댑터를 추가해야합니까? 이것은 내 파일 구조입니다. 내가 명확하지 않다면 알려주세요 ...
이것은 내가 지금까지 추가하고있는 곳입니다. 맞습니까? 내 우편 군중 신분증은 아직 거기에 없지만 그렇게 할 것을 알고 있습니다.
class ParseServer {
constructor({
appId = requiredParameter('You must provide an appId!'),
masterKey = requiredParameter('You must provide a masterKey!'),
appName,
filesAdapter,
push,
loggerAdapter,
logsFolder,
databaseURI,
databaseOptions,
databaseAdapter,
cloud,
collectionPrefix = '',
clientKey,
javascriptKey,
dotNetKey,
restAPIKey,
webhookKey,
fileKey = undefined,
facebookAppIds = [],
enableAnonymousUsers = true,
allowClientClassCreation = true,
oauth = {},
serverURL = requiredParameter('You must provide a serverURL!'),
maxUploadSize = '20mb',
verifyUserEmails = true,
preventLoginWithUnverifiedEmail = false,
cacheAdapter,
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',
}
},
publicServerURL,
customPages = {
invalidLink: undefined,
verifyEmailSuccess: undefined,
choosePassword: undefined,
passwordResetSuccess: undefined
},
어디에서 해당 코드를 포함합니까? 그것이 내가 정말로 혼란스러워하는 전부입니다. –
내 질문에 코드를 추가 할 위치에 코드를 추가했습니다. –
어떻게 parse-server를 example에서 사용하기 시작 했습니까? 아니면 parse-server를 다운로드하여 압축 해제 했습니까? –