[Solved] display string on client side by fetching data from server side


There is no export in pathJs and you want name() to return an object containing liner. You need

function name() {
  const liner = "this works"
  console.log(liner)
  //updated
  return {liner};

}

async function callName() {
  const data1 = await name()
  return data1;

}

callName()

module.exports = { callName };

The backend is probably crashing with TypeError: callName is not a function while handling the request and therefore doesn’t send a response.

7

solved display string on client side by fetching data from server side