App Dev Help

I was looking into creating an app that creates a basic service worker for sites that lighthouse suggests.

My problem is that the service worker needs to come from a url not inlined

Is there a way to include a file with the app?
If not my other idea was to use a worker that has the response but would that cost the users?

This may help you out:

I see that they exist and that could be the path to take but I dont see how billing works in that situation. I was hoping I could make something free for everyone.