You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help: "The port to run the ParseServer. defaults to 1337.",
15
49
default: 1337,
16
-
action: function(opt){
17
-
opt=parseInt(opt);
18
-
if(!Number.isInteger(opt)){
19
-
thrownewError("The port is invalid");
20
-
}
21
-
returnopt;
22
-
}
50
+
action: numberParser("port")
23
51
},
24
52
"databaseURI": {
25
53
env: "PARSE_SERVER_DATABASE_URI",
26
54
help: "The full URI to your mongodb database"
27
55
},
56
+
"databaseOptions": {
57
+
env: "PARSE_SERVER_DATABASE_OPTIONS",
58
+
help: "Options to pass to the mongodb client",
59
+
action: objectParser
60
+
},
61
+
"collectionPrefix": {
62
+
env: "PARSE_SERVER_COLLECTION_PREFIX",
63
+
help: 'A collection prefix for the classes'
64
+
},
28
65
"serverURL": {
29
66
env: "PARSE_SERVER_URL",
30
67
help: "URL to your parse server with http:// or https://.",
@@ -56,22 +93,12 @@ export default {
56
93
"push": {
57
94
env: "PARSE_SERVER_PUSH",
58
95
help: "Configuration for push, as stringified JSON. See https://github.com/ParsePlatform/parse-server/wiki/Push",
59
-
action: function(opt){
60
-
if(typeofopt=='object'){
61
-
returnopt;
62
-
}
63
-
returnJSON.parse(opt)
64
-
}
96
+
action: objectParser
65
97
},
66
98
"oauth": {
67
99
env: "PARSE_SERVER_OAUTH_PROVIDERS",
68
100
help: "Configuration for your oAuth providers, as stringified JSON. See https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#oauth",
69
-
action: function(opt){
70
-
if(typeofopt=='object'){
71
-
returnopt;
72
-
}
73
-
returnJSON.parse(opt)
74
-
}
101
+
action: objectParser
75
102
},
76
103
"fileKey": {
77
104
env: "PARSE_SERVER_FILE_KEY",
@@ -88,22 +115,12 @@ export default {
88
115
"enableAnonymousUsers": {
89
116
env: "PARSE_SERVER_ENABLE_ANON_USERS",
90
117
help: "Enable (or disable) anon users, defaults to true",
91
-
action: function(opt){
92
-
if(opt=="true"||opt=="1"){
93
-
returntrue;
94
-
}
95
-
returnfalse;
96
-
}
118
+
action: booleanParser
97
119
},
98
120
"allowClientClassCreation": {
99
121
env: "PARSE_SERVER_ALLOW_CLIENT_CLASS_CREATION",
100
122
help: "Enable (or disable) client class creation, defaults to true",
101
-
action: function(opt){
102
-
if(opt=="true"||opt=="1"){
103
-
returntrue;
104
-
}
105
-
returnfalse;
106
-
}
123
+
action: booleanParser
107
124
},
108
125
"mountPath": {
109
126
env: "PARSE_SERVER_MOUNT_PATH",
@@ -113,65 +130,45 @@ export default {
113
130
"filesAdapter": {
114
131
env: "PARSE_SERVER_FILES_ADAPTER",
115
132
help: "Adapter module for the files sub-system",
116
-
action: functionaction(opt){
117
-
if(typeofopt=='object'){
118
-
returnopt;
119
-
}
120
-
try{
121
-
returnJSON.parse(opt);
122
-
}catch(e){}
123
-
returnopt;
124
-
}
133
+
action: moduleOrObjectParser
125
134
},
126
135
"emailAdapter": {
127
136
env: "PARSE_SERVER_EMAIL_ADAPTER",
128
137
help: "Adapter module for the email sending",
129
-
action: functionaction(opt){
130
-
if(typeofopt=='object'){
131
-
returnopt;
132
-
}
133
-
try{
134
-
returnJSON.parse(opt);
135
-
}catch(e){}
136
-
returnopt;
137
-
}
138
+
action: moduleOrObjectParser
139
+
},
140
+
"verifyUserEmails": {
141
+
env: "PARSE_SERVER_VERIFY_USER_EMAILS",
142
+
help: "Enable (or disable) user email validation, defaults to false",
143
+
action: booleanParser
144
+
},
145
+
"appName": {
146
+
env: "PARSE_SERVER_APP_NAME",
147
+
help: "Sets the app name"
138
148
},
139
149
"loggerAdapter": {
140
150
env: "PARSE_SERVER_LOGGER_ADAPTER",
141
151
help: "Adapter module for the logging sub-system",
142
-
action: functionaction(opt){
143
-
if(typeofopt=='object'){
144
-
returnopt;
145
-
}
146
-
try{
147
-
returnJSON.parse(opt);
148
-
}catch(e){}
149
-
returnopt;
150
-
}
152
+
action: moduleOrObjectParser
151
153
},
152
154
"liveQuery": {
153
155
env: "PARSE_SERVER_LIVE_QUERY_OPTIONS",
154
156
help: "liveQuery options",
155
-
action: functionaction(opt){
156
-
if(typeofopt=='object'){
157
-
returnopt;
158
-
}
159
-
returnJSON.parse(opt);
160
-
}
157
+
action: objectParser
161
158
},
162
159
"customPages": {
163
160
env: "PARSE_SERVER_CUSTOM_PAGES",
164
161
help: "custom pages for pasword validation and reset",
0 commit comments