I follow the wix video and set up a job scheduler in the backend in a jsw file. It works.
I add an afterInsert hook to my database in the backend in a js file. It works too.
However, when I try to run the function in the jsw file through the js file. It does not.
I search through internet the difference between js and jsw file. It says that
the difference is in how those files are exposed to public code and page code. a js file is a regular backend module and is not exposed at all to client calls. a jsw file is a web module - it can be imported from client code. Is that true?
Should I call the function in the jsw file through the function in the js file?
Can any help and give me some suggestions?