@@ -40,7 +40,7 @@ if (process.env.USE_LOCAL !== 'TRUE') {
40
40
} ;
41
41
fsAdapter = new S3Adapter ( s3Options ) ;
42
42
} catch ( err ) {
43
- console . log ( 'err ' , err ) ;
43
+ console . log ( 'Please provide AWS credintials in env file! Defaulting to local storage.' ) ;
44
44
fsAdapter = new FSFilesAdapter ( {
45
45
filesSubDirectory : 'files' , // optional, defaults to ./files
46
46
} ) ;
@@ -74,7 +74,6 @@ if (process.env.SMTP_ENABLE) {
74
74
75
75
mailgunDomain = process . env . MAILGUN_DOMAIN ;
76
76
}
77
-
78
77
export const config = {
79
78
databaseURI :
80
79
process . env . DATABASE_URI || process . env . MONGODB_URI || 'mongodb://localhost:27017/dev' ,
@@ -83,14 +82,16 @@ export const config = {
83
82
} ,
84
83
appId : process . env . APP_ID || 'myAppId' ,
85
84
maxLimit : 500 ,
86
- masterKey : process . env . MASTER_KEY || '' , //Add your master key here. Keep it secret!
85
+ masterKey : process . env . MASTER_KEY , //Add your master key here. Keep it secret!
87
86
masterKeyIps : [ '0.0.0.0/0' , '::1' ] , // '::1'
88
87
serverURL : process . env . SERVER_URL || 'http://localhost:8080/app' , // Don't forget to change to https if needed
89
88
verifyUserEmails : process . env . SMTP_ENABLE || process . env . MAILGUN_API_KEY ? true : false ,
90
89
publicServerURL : process . env . SERVER_URL || 'http://localhost:8080/app' ,
91
90
// Your apps name. This will appear in the subject and body of the emails that are sent.
92
91
appName : 'Open Sign' ,
93
92
allowClientClassCreation : false ,
93
+ allowExpiredAuthDataToken : false ,
94
+ encodeParseObjectInCloudFunction : true ,
94
95
...( process . env . SMTP_ENABLE || process . env . MAILGUN_API_KEY
95
96
? {
96
97
emailAdapter : {
@@ -184,7 +185,7 @@ if (!process.env.TESTING) {
184
185
await server . start ( ) ;
185
186
app . use ( mountPath , server . app ) ;
186
187
} catch ( err ) {
187
- console . log ( 'Err ' , err ) ;
188
+ console . log ( err ) ;
188
189
}
189
190
}
190
191
// Mount your custom express app
@@ -209,8 +210,12 @@ if (!process.env.TESTING) {
209
210
httpServer . headersTimeout = 100000 ; // in milliseconds
210
211
httpServer . listen ( port , function ( ) {
211
212
console . log ( 'parse-server-example running on port ' + port + '.' ) ;
212
- const migrate = `APPLICATION_ID=${ process . env . APP_ID } SERVER_URL=http://localhost:8080/app MASTER_KEY=${ process . env . MASTER_KEY } npx parse-dbtool migrate` ;
213
+ const isWindows = process . platform === 'win32' ;
214
+ // console.log('isWindows', isWindows);
213
215
216
+ const migrate = isWindows
217
+ ? `set APPLICATION_ID=${ process . env . APP_ID } && set SERVER_URL=http://localhost:8080/app&& set MASTER_KEY=${ process . env . MASTER_KEY } && npx parse-dbtool migrate`
218
+ : `APPLICATION_ID=${ process . env . APP_ID } SERVER_URL=http://localhost:8080/app MASTER_KEY=${ process . env . MASTER_KEY } npx parse-dbtool migrate` ;
214
219
exec ( migrate , ( error , stdout , stderr ) => {
215
220
if ( error ) {
216
221
console . error ( `Error: ${ error . message } ` ) ;
@@ -224,6 +229,4 @@ if (!process.env.TESTING) {
224
229
console . log ( `Command output: ${ stdout } ` ) ;
225
230
} ) ;
226
231
} ) ;
227
- // This will enable the Live Query real-time server
228
- await ParseServer . createLiveQueryServer ( httpServer ) ;
229
232
}
0 commit comments