-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels