Deploy jsreport into firebase function as an existing Node.js project.



  • My code is:

    const express = require('express');
    const app = express();
    
    app.get('/', (req, res) => {
      res.send('Hello from the main application');
    });
    
    const reportingApp = express();
    app.use('/reporting', reportingApp);
    
    const server = app.listen(3000);
    
    const jsreport = require('jsreport')({
      extensions: {
          express: { app: reportingApp, server: server },
      },
      appPath: "/reporting"
    });
    
    jsreport.init().then(() => {
      console.log('jsreport server started')
    }).catch((e) => {
      console.error(e);
    });
    


  • I don't have experience with the firebase functions. Please share the error you are receiving or what problems you are experiencing.



  • Firebase functions have read-only permission. There is no permission to create any file or edit any data. In this environment is possible to run jsreport?



  • I see. Does it provide a temp where you can write? I guess you can reach the same problems when running the AWS Lambda function.
    Please try to read through the tutorial here
    https://jsreport.net/learn/aws-lambda-serverless

    In particular, check this config which disables writing to logs or redirects the writes to the temp
    https://github.com/jsreport/jsreport-aws-lambda-starter-kit/blob/master/prod.config.json


Log in to reply
 

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