Giter Club home page Giter Club logo

Comments (5)

beck24 avatar beck24 commented on June 26, 2024 7

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.

crapthings avatar crapthings commented on June 26, 2024 2

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.

beck24 avatar beck24 commented on June 26, 2024 1

That's perfect, thank you!

from node-export-server.

cvasseng avatar cvasseng commented on June 26, 2024

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.

thduttonuk avatar thduttonuk commented on June 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.