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
Copy file name to clipboardexpand all lines: README.md
+8-12
Original file line number
Diff line number
Diff line change
@@ -437,8 +437,6 @@ const server = ParseServer({
437
437
438
438
## Custom Routes
439
439
440
-
**Caution, this is an experimental feature that may not be appropriate for production.**
441
-
442
440
Custom routes allow to build user flows with webpages, similar to the existing password reset and email verification features. Custom routes are defined with the `pages` option in the Parse Server configuration:
443
441
444
442
### Example
@@ -448,7 +446,7 @@ const api = new ParseServer({
448
446
...otherOptions,
449
447
450
448
pages: {
451
-
enableRouter:true,// Enables the experimental feature; required for custom routes
449
+
enableRouter:true,
452
450
customRoutes: [{
453
451
method:'GET',
454
452
path:'custom_route',
@@ -485,7 +483,7 @@ The following paths are already used by Parse Server's built-in features and are
485
483
| Parameter | Optional | Type | Default value | Example values | Environment variable | Description |
|`pages`| yes |`Object`|`undefined`|-|`PARSE_SERVER_PAGES`| The options for pages such as password reset and email verification. |
488
-
|`pages.enableRouter`| yes |`Boolean`|`false`|-|`PARSE_SERVER_PAGES_ENABLE_ROUTER`| Is `true`if the pages router should be enabled; this is required for any of the pages options to take effect. **Caution, this is an experimental feature that may not be appropriate for production.**|
486
+
|`pages.enableRouter`| yes |`Boolean`|`false`|-|`PARSE_SERVER_PAGES_ENABLE_ROUTER`| Is `true`if the pages router should be enabled; this is required for any of the pages options to take effect. |
489
487
|`pages.customRoutes`| yes |`Array`|`[]`|-|`PARSE_SERVER_PAGES_CUSTOM_ROUTES`| The custom routes. The routes are added in the order they are defined here, which has to be considered since requests traverse routes in an ordered manner. Custom routes are traversed after build-in routes such as password reset and email verification. |
490
488
|`pages.customRoutes.method`||`String`|-|`GET`, `POST`|-| The HTTP method of the custom route. |
491
489
|`pages.customRoutes.path`||`String`|-|`custom_page`|-| The path of the custom route. Note that the same path can used if the `method` is different, for example a path `custom_page` can have two routes, a `GET` and `POST` route, which will be invoked depending on the HTTP request method. |
@@ -608,16 +606,14 @@ Assuming the script above is named, `parse_idempotency_delete_expired_records.sh
608
606
609
607
### Pages
610
608
611
-
**Caution, this is an experimental feature that may not be appropriate for production.**
612
-
613
609
Custom pages as well as feature pages (e.g. password reset, email verification) can be localized with the `pages` option in the Parse Server configuration:
614
610
615
611
```js
616
612
const api = new ParseServer({
617
613
...otherOptions,
618
614
619
615
pages: {
620
-
enableRouter: true, // Enables the experimental feature; required for localization
616
+
enableRouter: true,
621
617
enableLocalization: true,
622
618
}
623
619
}
@@ -665,7 +661,7 @@ const api = new ParseServer({
665
661
...otherOptions,
666
662
667
663
pages: {
668
-
enableRouter: true, // Enables the experimental feature; required for localization
664
+
enableRouter: true,
669
665
enableLocalization: true,
670
666
customUrls: {
671
667
passwordReset: 'https://example.com/page.html'
@@ -722,7 +718,7 @@ const api = new ParseServer({
722
718
...otherOptions,
723
719
724
720
pages: {
725
-
enableRouter:true,// Enables the experimental feature; required for localization
| `pages` | yes | `Object` | `undefined` | - | `PARSE_SERVER_PAGES` | The options for pages such as password reset and email verification. |
784
-
| `pages.enableRouter` | yes | `Boolean` | `false` | - | `PARSE_SERVER_PAGES_ENABLE_ROUTER` | Is `true` if the pages router should be enabled; this is required for any of the pages options to take effect. **Caution, this is an experimental feature that may not be appropriate for production.** |
780
+
| `pages.enableRouter` | yes | `Boolean` | `false` | - | `PARSE_SERVER_PAGES_ENABLE_ROUTER` | Is `true` if the pages router should be enabled; this is required for any of the pages options to take effect. |
785
781
| `pages.enableLocalization` | yes | `Boolean` | `false` | - | `PARSE_SERVER_PAGES_ENABLE_LOCALIZATION` | Is true if pages should be localized; this has no effect on custom page redirects. |
786
782
| `pages.localizationJsonPath` | yes | `String` | `undefined` | `./private/translations.json` | `PARSE_SERVER_PAGES_LOCALIZATION_JSON_PATH` | The path to the JSON file for localization; the translations will be used to fill template placeholders according to the locale. |
787
783
| `pages.localizationFallbackLocale` | yes | `String` | `en` | `en`, `en-GB`, `default` | `PARSE_SERVER_PAGES_LOCALIZATION_FALLBACK_LOCALE` | The fallback locale for localization if no matching translation is provided for the given locale. This is only relevant when providing translation resources via JSON file. |
'The options for pages such as password reset and email verification. Caution, this is an experimental feature that may not be appropriate for production.',
417
+
help: 'The options for pages such as password reset and email verification.',
'Is true if the pages router should be enabled; this is required for any of the pages options to take effect. Caution, this is an experimental feature that may not be appropriate for production.',
700
+
'Is true if the pages router should be enabled; this is required for any of the pages options to take effect.',
/* Public URL to your parse server with http:// or https://.
218
218
:ENV: PARSE_PUBLIC_SERVER_URL */
219
219
publicServerURL: ?string;
220
-
/* The options for pages such as password reset and email verification. Caution, this is an experimental feature that may not be appropriate for production.
220
+
/* The options for pages such as password reset and email verification.
/* Is true if the pages router should be enabled; this is required for any of the pages options to take effect. Caution, this is an experimental feature that may not be appropriate for production.
380
+
/* Is true if the pages router should be enabled; this is required for any of the pages options to take effect.
381
381
:DEFAULT: false */
382
382
enableRouter: ?boolean;
383
383
/* Is true if pages should be localized; this has no effect on custom page redirects.
0 commit comments