Wix Modules JSW files

Hi All, @yisrael-wix @nalinwix @tiaan I have been developing my website utilising a lot of the front end to add extra code, I am now needing to place some of this in the backend as even though I have a HTTPS secure website I have been advised that having security aspects in the front end/client side is not the safest, I have tried today to place a simple fetch function in a JSW file to call a IP address of the current user for this to be displayed on a number of different pages on my website, I have not however been able to gain anything other than an undefined response in front end? this is the code below:

// Filename: backend/IPAddress.jsw (web modules need to have a .jsw extension)
import {fetch} from ‘wix-fetch’;

export function getCurrentUserIP() {
fetch(‘https://extreme-ip-lookup.com/json’, {
method: ‘get’
})
.then((httpResponse) => {
if (httpResponse.ok) {
return httpResponse.json();
}
})
.then((json) => {
const ipaddress = json.query;
return ipaddress;
});

}

I am struggling with figuring out how to access the IP from front end and display it? if anyone can help with an example of the code that would be great, I have looked at calling backend from web modules code on wix and followed instructions but just returns an undefined response?