solomon-v3-stories v1.15.5
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
inpackage.json
withsolomon-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
tohttps://solomon-v3-stories-preview.azurewebsites.net/api
- make sure
modules.mailchimp.enabled: true
- update
- 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 theHOSTNAME_OVERRIDE
set e.g.HOSTNAME_OVERRIDE=v3.mysolomon.co.uk
matches V3 api server used insolomonApi
inv3-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
8 months ago
8 months ago
8 months ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago