node-export-server icon indicating copy to clipboard operation
node-export-server copied to clipboard

Docs for offline

Open KacperMadej opened this issue 3 years ago • 6 comments

Add docs for offline installation and usage.

This is a feature request - vote with a thumbs-up reaction under this comment.

KacperMadej avatar May 19 '21 11:05 KacperMadej

I have a better suggestion. Why not just host the Highcharts node package with all the deps? Some of us dont have internet connection on the machine we work on. Packing on one machine and transferring on another is a pain in my 🍑. In the past I used npm-bundle but with latest Highcharts that doesnt seem to work.

sjoshid avatar Jun 08 '21 19:06 sjoshid

In the past I used npm-bundle but with latest Highcharts that doesnt seem to work.

I was able to get past this hurdle. The problem was npm-bundle highcharts-export-server waits for user input on "Accept license (y/n)" forever. There is a env var I added to always accept this license (dont remember name of env var Im on a different machine) without user input. It worked!

sjoshid avatar Jun 11 '21 17:06 sjoshid

hello,

is there any news about the offline usage which you mentioned ?

m-cisse-easy-live avatar Mar 10 '23 09:03 m-cisse-easy-live

Same here, I'm behind a proxy which won't allow node-export-server to connect to the cdn to download highcharts. Is there a way to tell node-export-server to use a version of highcharts that's already installed on the same machine ?

lebesnec avatar Nov 29 '23 13:11 lebesnec

Currently, there's no easy way to achieve this apart from fetching all the Highcharts scripts into the .cache directory before going offline. You can take a look at how the scripts are cached and try to write a custom function which would put all your local files into cache instead of fetching them from the internet.

We have this issue in our backlog and will try to propose a solution after all the prioritized issues are solved.

I'll keep you posted.

jszuminski avatar Nov 30 '23 10:11 jszuminski

Hi,

In case someone finds this helpful, we're packaging this repository as a docker image for an airgapped environment, and as the last step of the Docker build we are running the server for 10sec, so it puts all those artifacts in cache:

# We need to run this once to warm the cache, otherwise the docker image
# will need internet access
RUN timeout 10 ./node_modules/.bin/highcharts-export-server \
  --enableServer 1 \
  --port 8080 \
  --loadConfig /app/config/highcharts-config.json || true

EXPOSE 8080
ENTRYPOINT [ \
  "./node_modules/.bin/highcharts-export-server", \
  "--enableServer", "1", \
  "--port", "8080", \
  "--loadConfig", "/app/config/highcharts-config.json" ]

Not as nice as having a setting somewhere, but it works...

nonell-viavi avatar Sep 18 '24 11:09 nonell-viavi