From 4151cb0b403c089502d8b5bf681686a28baf81f6 Mon Sep 17 00:00:00 2001 From: Prafull Navkar <87638003+rjcodedev@users.noreply.github.com> Date: Wed, 10 Jan 2024 23:15:44 +0530 Subject: [PATCH] fix #432: cloud path is not working in Windows due absolute paths protocol --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 2baf852c93..b6be3d33e9 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,9 @@ import http from 'http'; export const config = { databaseURI: process.env.DATABASE_URI || process.env.MONGODB_URI || 'mongodb://localhost:27017/dev', - cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js', + cloud: function () { + import('./cloud/main.js'); + }, appId: process.env.APP_ID || 'myAppId', masterKey: process.env.MASTER_KEY || '', //Add your master key here. Keep it secret! serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse', // Don't forget to change to https if needed