{"action":"created","issue":{"url":"https://api.github.com/repos/ecohealthalliance/parse-server-amazon-ses-email-adapter/issues/1","repository_url":"https://api.github.com/repos/ecohealthalliance/parse-server-amazon-ses-email-adapter","labels_url":"https://api.github.com/repos/ecohealthalliance/parse-server-amazon-ses-email-adapter/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ecohealthalliance/parse-server-amazon-ses-email-adapter/issues/1/comments","events_url":"https://api.github.com/repos/ecohealthalliance/parse-server-amazon-ses-email-adapter/issues/1/events","html_url":"https://github.com/ecohealthalliance/parse-server-amazon-ses-email-adapter/issues/1","id":180046795,"number":1,"title":"Unexpected identifier","user":{"login":"trondkr","id":3648387,"avatar_url":"https://avatars.githubusercontent.com/u/3648387?v=3","gravatar_id":"","url":"https://api.github.com/users/trondkr","html_url":"https://github.com/trondkr","followers_url":"https://api.github.com/users/trondkr/followers","following_url":"https://api.github.com/users/trondkr/following{/other_user}","gists_url":"https://api.github.com/users/trondkr/gists{/gist_id}","starred_url":"https://api.github.com/users/trondkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trondkr/subscriptions","organizations_url":"https://api.github.com/users/trondkr/orgs","repos_url":"https://api.github.com/users/trondkr/repos","events_url":"https://api.github.com/users/trondkr/events{/privacy}","received_events_url":"https://api.github.com/users/trondkr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-29T13:18:45Z","updated_at":"2016-09-29T13:57:51Z","closed_at":null,"body":"I keep getting an error trying to deploy my index.js after adding support for email verification using your code. I am not an experienced javascript programmer so I may be doing something erroneous. Do you see what may cause  me to get \r\n\r\n```\r\n/var/app/current/index.js:24\r\n  emailAdapter: {\r\n  ^^^^^^^^^^^^\r\n\r\nSyntaxError: Unexpected identifier\r\n    at exports.runInThisContext (vm.js:53:16)\r\n    at Module._compile (module.js:373:25)\r\n    at Object.Module._extensions..js (module.js:416:10)\r\n    at Module.load (module.js:343:32)\r\n    at Function.Module._load (module.js:300:12)\r\n    at Function.Module.runMain (module.js:441:10)\r\n    at startup (node.js:139:18)\r\n    at node.js:968:3\r\n```\r\nThanks! Cheers, Trond\r\n\r\nMy index.js:\r\n\r\n```\r\n// Example express application adding the parse-server module to expose Parse\r\n// compatible API routes.\r\n\r\nvar express = require('express');\r\nvar ParseServer = require('parse-server').ParseServer;\r\nvar path = require('path');\r\n\r\nvar databaseUri = process.env.DATABASE_URI || process.env.MONGODB_URI;\r\n\r\nif (!databaseUri) {\r\n  console.log('DATABASE_URI not specified, falling back to localhost.');\r\n}\r\n\r\nvar api = new ParseServer({\r\n  databaseURI: databaseUri || 'mongodb://localhost:27017/dev',\r\n  cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',\r\n  appId: process.env.APP_ID || 'myAppId',\r\n  masterKey: process.env.MASTER_KEY || '', //Add your master key here. Keep it secret!\r\n  fileKey: process.env.FILE_KEY || '', // Add the file key to provide access to files already hosted on Parse\r\n  serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse',  // Don't forget to change to https if needed\r\n  liveQuery: {\r\n    classNames: [\"Posts\", \"Comments\"] // List of classes to support for query subscriptions\r\n  },\r\n  emailAdapter: {\r\n      module: \"parse-server-amazon-ses-email-adapter\",\r\n      options: {\r\n         fromAddress: \"domain <noreply@domain.com>\",\r\n         accessKeyId: \"keyId\",\r\n         secretAccessKey: \"AccessKey\",\r\n         region: \"us-east-1\",\r\n         // The template section\r\n         templates: {\r\n           passwordResetEmail: {\r\n             subject: 'Reset your password',\r\n             pathPlainText: resolve(__dirname, '/public/templates/password_reset_email.txt'),\r\n             pathHtml: resolve(__dirname, '/public/templates/password_reset_email.html'),\r\n             callback: (user) => {\r\n                 return {\r\n                   firstName: user.get('firstName')\r\n                 }\r\n               }\r\n              // Now you can use {{firstName}} in your templates\r\n           },\r\n           verificationEmail: {\r\n             subject: 'Confirm your account',\r\n             pathPlainText: resolve(__dirname, '/public/templates/verification_email.txt'),\r\n             pathHtml: resolve(__dirname, '/public/templates/verification_email.html'),\r\n             callback: (user) => {\r\n                 return {\r\n                   firstName: user.get('firstName')\r\n                 }\r\n               }\r\n               // Now you can use {{firstName}} in your templates\r\n           },\r\n           customEmailAlert: {\r\n             subject: 'Urgent notification!',\r\n             pathPlainText: resolve(__dirname, '/public/templates/custom_alert.txt'),\r\n             pathHtml: resolve(__dirname, '/public/templates/custom_alert.html'),\r\n           }\r\n         }\r\n       }\r\n    }\r\n});\r\n// Client-keys like the javascript key or the .NET key are not necessary with parse-server\r\n// If you wish you require them, you can set them as options in the initialization above:\r\n// javascriptKey, restAPIKey, dotNetKey, clientKey\r\n\r\nvar app = express();\r\n\r\n// Serve static assets from the /public folder\r\napp.use('/public', express.static(path.join(__dirname, '/public')));\r\n\r\n// Serve the Parse API on the /parse URL prefix\r\nvar mountPath = process.env.PARSE_MOUNT || '/parse';\r\napp.use(mountPath, api);\r\n\r\n// Parse Server plays nicely with the rest of your web routes\r\napp.get('/', function(req, res) {\r\n  res.status(200).send('Make sure to star the parse-server repo on GitHub!');\r\n});\r\n\r\n// There will be a test page available on the /test path of your server url\r\n// Remove this before launching your app\r\napp.get('/test', function(req, res) {\r\n  res.sendFile(path.join(__dirname, '/public/test.html'));\r\n});\r\n\r\nvar port = process.env.PORT || 1337;\r\nvar httpServer = require('http').createServer(app);\r\nhttpServer.listen(port, function() {\r\n    console.log('parse-server-example running on port ' + port + '.');\r\n});\r\n\r\n// This will enable the Live Query real-time server\r\nParseServer.createLiveQueryServer(httpServer);\r\n```"},"comment":{"url":"https://api.github.com/repos/ecohealthalliance/parse-server-amazon-ses-email-adapter/issues/comments/250473453","html_url":"https://github.com/ecohealthalliance/parse-server-amazon-ses-email-adapter/issues/1#issuecomment-250473453","issue_url":"https://api.github.com/repos/ecohealthalliance/parse-server-amazon-ses-email-adapter/issues/1","id":250473453,"user":{"login":"dan-nyanko","id":12954045,"avatar_url":"https://avatars.githubusercontent.com/u/12954045?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-nyanko","html_url":"https://github.com/dan-nyanko","followers_url":"https://api.github.com/users/dan-nyanko/followers","following_url":"https://api.github.com/users/dan-nyanko/following{/other_user}","gists_url":"https://api.github.com/users/dan-nyanko/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-nyanko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-nyanko/subscriptions","organizations_url":"https://api.github.com/users/dan-nyanko/orgs","repos_url":"https://api.github.com/users/dan-nyanko/repos","events_url":"https://api.github.com/users/dan-nyanko/events{/privacy}","received_events_url":"https://api.github.com/users/dan-nyanko/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T13:57:51Z","updated_at":"2016-09-29T13:57:51Z","body":"@trondkr Also, if you're interested in setting up parse-sever using [babel](https://babeljs.io/) transpiler for ES6 feature, check out our [gq-parse-server](https://github.com/ecohealthalliance/gq-parse-server) repository."}}
{"actor":{"display_login":"dan-nyanko"}}