1.15.5 • Published 8 months ago

solomon-v3-stories v1.15.5

Weekly downloads
1
License
ISC
Repository
-
Last release
8 months ago

Solomon V3 Stories

Mailchimp Integration Testing

Testing In Preview

To test the end-to-end integration of API & Mailchimp you should deploy to preview and point your demo/preview Solomon app to the preview stories api.

  • On your WIP branch find and replace solomon-v3-stories:latest in package.json with solomon-v3-stories:preview & save the file.
  • When you're ready to test run npm run dockerBuildAndDeploy
  • Change the config for the app you're going to test e.g. solomon-v3-demo
    • update solomonStoriesApi.host to https://solomon-v3-stories-preview.azurewebsites.net/api
    • make sure modules.mailchimp.enabled: true
  • restart the preview api on azure portal & test using your preview site

Testing mailchimp integration locally

It is VERY difficult to test locally. As well as the incomplete steps below, the redirect url in the mailchimp account where the application is registered (Main Solomon) needs to exactly match the redirect url passed (ngrok in this case) You also need to make sure you're mapping/forcing the correct host database & config database

HTTP Forwarding your stories api so Mailchimp can access

run ngrok forwarding port 3000 cd FOLDER_CONTAINING_NGROK ./ngrok http 3000 take the resulting http address and enter it into your local solomon-v3-ui environment file under APP.solomonConfig.apis.solomonStoriesApi.host e.g.

solomonStoriesApi: {
  host: 'https://c4f8-81-104-239-27.ngrok.io/api'
}

Stories API env setup

  • Make sure .env in this stories api repo has the HOSTNAME_OVERRIDE set e.g. HOSTNAME_OVERRIDE=v3.mysolomon.co.uk matches V3 api server used in solomonApi in v3-ui environment.js e.g.
apis: {
  solomonApi: {
    host: 'https://solomon-v3-api-demo.azurewebsites.net'
  }
}

USING A TEST MAILCHIMP APP

  • in .env make sure to use a testing mailchimp app's client id & secret. If you were to try test locally using the live main solomon mailchimp app's credentials you would have to edit that to redirect to your ngrok address - affecting all live use. So you need to create a testing app. We have one under the development account for nathan@mysolomon.co.uk.

Add the ngrok address as the Redirect URI in the mailchimp app settings

Go to the testing mailchimp account's app settings and enter the Redirect Uri to your newly created ngrok address plus /api/mailchimp/callback e.g. http://1b8d-188-28-168-239.ngrok.io/api/mailchimp/callback

Add ngrok redirect url to stories api .env

In stories api /env file set MAILCHIMP_REDIRECT_URL to the same ngrok address as you used in the previous step on the mailchimp app settings http://1b8d-188-28-168-239.ngrok.io/api/mailchimp/callback

V3 UI Env setup

Make sure to enable mailchimp module in your locally served ui app...

modules: {
  mailchimp: {
    enabled: true,
  }
}

...in the environment.js ember s from local v3-ui

You should now be able to use the mailchimp functionality locally and debug in to all aspects in your locally serving V3 Stories API

1.15.4

8 months ago

1.15.3

8 months ago

1.15.5

8 months ago

1.15.2

1 year ago

1.15.0

2 years ago

1.15.1

2 years ago

1.14.0

2 years ago

1.12.3

3 years ago

1.12.2

3 years ago

1.13.0

3 years ago

1.12.1

3 years ago

1.12.5

3 years ago

1.12.4

3 years ago

1.10.5

3 years ago

1.10.4

3 years ago

1.10.3

3 years ago

1.12.0

3 years ago

1.10.2

3 years ago

1.11.0

3 years ago

1.10.1

3 years ago

1.10.0

3 years ago

1.9.3

3 years ago

1.9.2

4 years ago

1.9.1

4 years ago

1.9.0

4 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.4

5 years ago

1.6.3

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago