Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Deliver HTML panel using NodeJS Express

Community Beginner ,
Nov 10, 2020 Nov 10, 2020

Hello all,

I do have an Adobe HTML Panel based on a ReactJS app which works great so far, but the biggest issue with this approach is that all requests are made using the `file://` origin causing more issues, like:

1. Not all APIs requests are accepted

2. AWS Cognito callback is not recognized

 

Is there a way that I can deliver my HTML Panel (ReactJS) through an Express Server (NodeJS) or any other specific server so I the end all of my requests will have the origin `http://localhost:PORT/` or maybe there is other `The Adobe Way` that I am missing?

Thank you in advance

TOPICS
How to , SDK
374
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 30, 2023 Jan 30, 2023

You have a few options:

  • Have a frontend and backend architecture. Essentially 2 panels, a headless backend running Express or something serving up the fronted, and a frontend pointed to the localhost port of the backend.
  • Allow "file://" protocol requests to your allowed options for your API key.
  • Have a separate process, Node.js / Python or whatever you like, and pipe requests through there.

 

Also if you're interested in building panels with React, check out the Bolt CEP boilerplate: https://github.com/hyperbrew/bolt-cep

Translate
Community Expert ,
Jan 30, 2023 Jan 30, 2023
LATEST

You have a few options:

  • Have a frontend and backend architecture. Essentially 2 panels, a headless backend running Express or something serving up the fronted, and a frontend pointed to the localhost port of the backend.
  • Allow "file://" protocol requests to your allowed options for your API key.
  • Have a separate process, Node.js / Python or whatever you like, and pipe requests through there.

 

Also if you're interested in building panels with React, check out the Bolt CEP boilerplate: https://github.com/hyperbrew/bolt-cep

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines