From 642be79375b18ec3fc2e00a506ddba2a2ed5c104 Mon Sep 17 00:00:00 2001 From: byrond Date: Fri, 15 May 2020 13:36:41 -0400 Subject: [PATCH 1/3] add cors config instructions --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 253df23..bc80d7f 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,25 @@ Create a `src/.env.local.js` configuration file. You can copy the [src/.env.local.js.example](src/.env.local.js.example) example and edit the values provided. +If you are using this app with Drupal, enable CORS support in `services.yml`: +``` + cors.config: + enabled: true + # Specify allowed headers, like 'x-allowed-header'. + allowedHeaders: [] + # Specify allowed request methods, specify ['*'] to allow all possible ones. + allowedMethods: [] + # Configure requests allowed from specific origins. + allowedOrigins: ['http://localhost:3000'] + # Sets the Access-Control-Expose-Headers header. + exposedHeaders: false + # Sets the Access-Control-Max-Age header. + maxAge: false + # Sets the Access-Control-Allow-Credentials header. + supportsCredentials: false + ``` + + ### Start the development server Run `yarn start` from the repo root to run the app in development mode. From 6a5e88b00469fdc9b3375843d2c7a84cda0bf5c5 Mon Sep 17 00:00:00 2001 From: byrond Date: Mon, 18 May 2020 16:38:53 -0400 Subject: [PATCH 2/3] move CORS instructions to "Local testing" section --- README.md | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index bc80d7f..07d34b5 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,21 @@ Run `yarn install` from the repo root. Create a `src/.env.local.js` configuration file. -You can copy the [src/.env.local.js.example](src/.env.local.js.example) example and edit the values provided. +You can copy the [src/.env.local.js.example](src/.env.local.js.example) example and edit the values provided. + +### Start the development server + +Run `yarn start` from the repo root to run the app in development mode. + +It should automatically open http://localhost:3000 in a browser. + +The page will automatically reload if you make changes to the code. + +You will see the build errors and lint warnings in the console. + +## Local testing + +When you run the start script `yarn start`, code quality (linting) tests are automatically run and feedback is provided in the terminal. If you are using this app with Drupal, enable CORS support in `services.yml`: ``` @@ -52,22 +66,7 @@ If you are using this app with Drupal, enable CORS support in `services.yml`: maxAge: false # Sets the Access-Control-Allow-Credentials header. supportsCredentials: false - ``` - - -### Start the development server - -Run `yarn start` from the repo root to run the app in development mode. - -It should automatically open http://localhost:3000 in a browser. - -The page will automatically reload if you make changes to the code. - -You will see the build errors and lint warnings in the console. - -## Local testing - -When you run the start script `yarn start`, code quality (linting) tests are automatically run and feedback is provided in the terminal. +``` Cypress is installed for end-to-end testing. You can run the tests by running `yarn cypress`. This will open an Electron binary to run the end-to-end testing. You can then run a specific test or run all tests using "Run all specs" link. From e1e713fd02dd50c45381f5d63ac2a53fcca35398 Mon Sep 17 00:00:00 2001 From: byrond Date: Mon, 18 May 2020 16:39:40 -0400 Subject: [PATCH 3/3] remove whitespace --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 07d34b5..00a6166 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Run `yarn install` from the repo root. Create a `src/.env.local.js` configuration file. -You can copy the [src/.env.local.js.example](src/.env.local.js.example) example and edit the values provided. +You can copy the [src/.env.local.js.example](src/.env.local.js.example) example and edit the values provided. ### Start the development server