jsreport start ignores --httpPort parameter



  • I've noticed something very strange. On our test machine the jsreport start disregards the port from the configuration file. When I explicitly provided the port as --httpPort 3333 it still didn't take it.
    We have an env variable $PORT set on that machine and jsreport always take on the port number value from that variable for some reason.



  • Yes, unfortunately at this moment it prefers the env PORT over the argument.
    We've changed it already in the v2.
    However we don't want to do the same change in the v1 because it is breaking.

    Do you use jsreport binary or normal jsreport installation?
    In case of normal installation you can edit the server.js and put to the top

    process.env.PORT = null
    

    or use

    set PORT=&&jsreport start --httpPort 3333
    


  • Thank you!

    The most interesting part is that I'm using the command line mode for render and it fails to start with --keepAlive since another app is running on the $PORT, is the command line execution still uses the port? Is there a way to override it easily in the command line execution? I guess the export PORT=&&... would work too.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.