Adding javascript to backend - help

Struggling with this GET request on my site. It says in the API to:

To add an HTTP function, add a file named http-functions.js to the Backend section of your site. The code for your HTTP functions is added to that file.

But how exactly do I do this since the backend wants a web module or JSW only? I’m sure it’s something trivial i’m missing here.

any help would be greatly appreciated.

Could you get more into details on what you are trying to achieve? JSW files are to use on page codes, whereas http-function.js is to EXPOSE an api of your website, that means that other application will try to communicate with it.

Hi Darrin,

When you put the mouse cursor over the " Backend " title, a small “plus” icon appears on the right side of that row. By clicking on it you will get a menu with additional options - you need to choose the " New .js file " one.

Name the file http-functions.js - it will be created with a default content containing an example of a simple HTTP function implementation.

Here you can find more information on HTTP functions - wix-http-functions - Velo API Reference -


Thanks Alexander. As i suspected it was an obvious thing i was overlooking. All working now.