0
我們正在從parse.com遷移到AWS。 該解決方案在本地完全正常工作,但是一旦我到eb deploy
到AWS,它就無法加載雲代碼文件。AWS託管分析服務器無法找到雲代碼
Error: Cannot find module '/cloud/main.js'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at new ParseServer (/var/app/current/node_modules/parse-server/lib/ParseServer.js:268:9)
at new _ParseServer (/var/app/current/node_modules/parse-server/lib/index.js:38:16)
at Object.<anonymous> (/var/app/current/index.js:8:11)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
我的解析服務器的配置是這樣的:
var api = new ParseServer({
databaseURI: config.DATABASE_URI ,
cloud: __dirname + '/cloud/main.js' ,
appId: config.parse.APP_ID,
masterKey: config.parse.MASTER_KEY ,
restApiKey: config.parse.REST_API_KEY,
serverURL: config.parse.SERVER_URL // Don't forget to change to https if needed
});
AWS顯然無法找到文件@__dirname + '/cloud/main.js'
我應該設置什麼該爲AWS?