I have already worked on a project that involved file handling in SAPUI5 app via back-end OData service.
As you mentioned that the OData service already exists, my first task would be to create a user friendly view in which a list of all the files(in your case the .js file) present at your back-end database will be displayed, each item in the list will show the name of the file and a download button. The user when presses the Download button respective to an item in the list, the specific file is downloaded to the user's system.
Please contact me via email and we will discuss further details about the requirement.