Comments (5)
So I've finally figured this out... forever won't work if highcharts-export-server is installed globally as documented.
Install locally:
npm install highcharts-export-server
Then create a file for our node app called highcharts-server.js
// include the exporter module
const exporter = require('highcharts-export-server');
//Set up a pool of PhantomJS workers
exporter.initPool();
exporter.startServer(7801);
Then start the server with pm2
forever start -l forever-highcharts.log -a -o highcharts.log -e error.log highcharts-node.js
Though I've also found a newer more actively maintained and better documented alternative to forever - https://github.com/Unitech/pm2
pm2 start highcharts-server.js --name "highcharts-export-server"
Hopefully this can be incorporated into the docs somewhere to help the next guy. Thanks!
from node-export-server.
if u want to pass options to highchart server you can
pm2 start ./bin/cli.js --name='highchart-server' -- --enableServer 1 --port 8080
from node-export-server.
That's perfect, thank you!
from node-export-server.
Thanks!
I've added a section on running with forever (by cloning the export repo to avoid having to write a boilerplate script).
I will look into pm2 and add it to the docs once I've tried it out. :)
from node-export-server.
This worked for me.
sudo pm2 start highcharts-export-server -- --enableServer 1 --host 10.4.0.9 --port 80 --allowCodeExecution true
from node-export-server.
Related Issues (20)
- 3.0.2 contains a merge conflict in index.cjs HOT 2
- corrupt images generated in CI
- MomentJS + Highcharts: `time.timezone` option does not work (`m.tz is not a function`) HOT 4
- Using custom js code in callback HOT 1
- "Could not find Chrome" error when running in IIS HOT 19
- Background transparency stopped working with version 3.0 HOT 8
- Docker file for V3 HOT 9
- [SVG output] Adding image with URL or base64 url format creates invalid SVG HOT 6
- [SVG output] trying to use styledMode results in black image HOT 7
- Highmaps not working on version 3 HOT 2
- Support for WebSocket connection
- Highcharts expects point configuration to be numbers or arrays in turbo mode HOT 3
- How can I address the "missing module for treegraph" error in the stable branch of the export-server? HOT 1
- JPEG Output now has black background HOT 1
- All Exports Given Default "chart" Filename HOT 1
- No v2.1.0 tag HOT 1
- Export server is assuming list of CDN downloads which don't work on older HC versions HOT 2
- Puppeteer unable to launch chrome HOT 3
- No ability to change cache directory path HOT 2
- `startExport` does not export from JSON to SVG correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-export-server.