Forge and React - why I can't connect

Hello.

I’m trying to migrate my app from default Forge to Custom UI based on React.

I’m in the situation, where I can access to my app from my local browser (from pc to server ip:3001) but on Jira Cloud, I see blank page (with loading bars).

Can you help me?

manifest:

app:
  runtime:
    name: nodejs20.x
  id: ari:cloud:ecosystem::app/xxx

modules:
  jira:globalPage:
    - key: sql-connector
      title: Puritly
      icon: https://www.svgrepo.com/download/530676/genetically-modified.svg
      resource: main
      resolver:
        function: resolver
  function:
    - key: resolver
      handler: resolver.run

resources:
  - key: main
    path: static
    tunnel:
      port: 3001

resolver.js

import fs from 'fs';
import path from 'path';

export async function run(event, context) {
  console.log('Resolver wywołany');  // <-- kluczowy log
  
  try {
    const indexPath = path.join(__dirname, '..', 'static', 'index.html');
    console.log('Ścieżka do index:', indexPath);  // Dodatkowy log ścieżki
    const html = fs.readFileSync(indexPath, 'utf-8');
    return {
      body: html,
      headers: {
        'Content-Type': 'text/html; charset=utf-8',
      },
    };
  } catch (error) {
    console.error('Błąd resolvera:', error);
    return {
      statusCode: 500,
      body: `<h1>Internal Server Error</h1>`,
    };
  }
}