Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Campaign preview via browser #3

14 tasks done
rykov opened this issue Jul 8, 2017 · 1 comment
14 tasks done

Campaign preview via browser #3

rykov opened this issue Jul 8, 2017 · 1 comment


Copy link

@rykov rykov commented Jul 8, 2017

This will work by exposing a "localhost" API endpoint from the CLI, and use a hosted single page Javascript app to call the API (with Cross-Origin Resource Sharing) to render the results:

  • GraphQL API in CLI
    • Add "server" command to start server
    • Add "preview" command to start server and open browser preview
    • Expose version API to connection/compatibility check
    • Expose single email rendering API
  • Javascript app
    • Create and configure Ember.js app build
    • Choose reconfigurable client-side API library
    • Add "connect" route to configure API client
    • Add "render" route to show rendered email
    • Add compatibility check to "connect" route
    • Add error handling for "connect" route
    • Add error handling for "render" route
    • Create manual connect flow

Things to consider:

We are calling a "localhost" API that cannot use HTTPS due to lack of a valid certificate. Thus browser security policy will not allow our Javascript preview app to call an HTTP API, unless the app is loaded via HTTP as well. (Secure pages cannot load unsecured resources). This may be ok, or we may need to proxy the whole page through the CLI to secure the remote connection:

Browser <--[http]--> CLI <--[https]--> Hosted JS app
@rykov rykov self-assigned this Jul 25, 2017
Copy link
Owner Author

@rykov rykov commented Jul 29, 2017

We have the basic preview app and API in place to be included in the next release.

@rykov rykov closed this as completed Jul 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

1 participant