charter13
Posts: 3
Joined: Wed Jan 12, 2022 3:46 pm

How to start highcharts-export-server with --allowCodeExecution

Greetings.

I configured my own export server on EC2.
I have a file with following code:

Code: Select all

const exporter = require('highcharts-export-server')

exporter.initPool({maxWorkers: 1});

exporter.startServer();

const app = exporter.server.app

module.exports.server = app;

and then I start it using forever library.

My question is how I can add a flag --allowCodeExecution while starting a server like this so that I can use callback functions?

Thank you.
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: How to start highcharts-export-server with --allowCodeExecution

Hello charter13,

Welcome to our forum and thanks for contacting us with your question!

You need to run the following code in the command line:

Code: Select all

highcharts-export-server --enableServer 1 --allowCodeExecution 1

Doc:
https://github.com/highcharts/node-expo ... es-in-v210

Feel free to ask any further questions,
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
charter13
Posts: 3
Joined: Wed Jan 12, 2022 3:46 pm

Re: How to start highcharts-export-server with --allowCodeExecution

Thanks, Magdalena for your answer.
Sorry for the late reply but I somehow missed your answer.
I do understand your answer and this is what I found in your documentation as well(the one you linked).
But this doesn't answer my question which was how to use that setting if I am starting highcharts-export-server as a module?
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: How to start highcharts-export-server with --allowCodeExecution

Hi,

I've noticed you have created a thread with the same question here: https://stackoverflow.com/questions/708 ... s-a-module

Please, continue this thread on StackOverflow and for the future, please do not duplicate topics on multiple support channels - the answers are being delivered asap anyway.

Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
charter13
Posts: 3
Joined: Wed Jan 12, 2022 3:46 pm

Re: How to start highcharts-export-server with --allowCodeExecution

I opened a thread there as here I didn't get the response on my question and I need an answer asap.
SO is more likely to be seen by more people (and different audiences) so I would really call it a duplication.
Since I didn't get my answer there either and this is the support forum for highcharts usage I would really appreciate it if you could help me with this.


Kind regards.
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: How to start highcharts-export-server with --allowCodeExecution

Hi,

I understand. We work as a single team across all support platforms including stack overflow, so sometimes it doubles our work. Your thread will be continued at SO by my colleague @piotr.m (madepie at SO) - an export server expert.

If you are our licensed customer with a valid Advantage plan, you can contact us on Skype via live text chat, see more info here:https://www.highcharts.com/blog/support/

Thank you for your patience,
Best regards!
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Usage”