Health-check endpoints in jsreport



  • Hello,
    I'm trying to setup a health-check endpoint to our jsreport server. Is it possible to add an endpoint to the jsreports or does jsreports have a health check endpoint I could utilize?
    This endpoint will be sampled by AWS ELB in order to determine if the service is available.

    Something like the following.

    Request details:

    Method: GET

    Path: /ping

    Response details:

    HTTP code - 200

    Body - empty

    Thanks for any help you could offer.



  • NM I figured it out.

      jsreport.init().then(function (i) {
        var app = i.express.app
    
        app.get('/ping', function(req, res){
          res.send({})
        })
        // running
      }).catch(function (e) {
        // error during startup
        console.error(e.stack)
        process.exit(1)
      })
    

Log in to reply
 

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