DEV Community

Alessandro Diaferia
Alessandro Diaferia

Posted on

How do people package simple backend-less utility apps made in JavaScript these days?

I'm considering releasing a small utility application that helps me pull and compose data from HTTP APIs. What's the best way these days to package such an app that doesn't require any backend but needs to perform network requests?

Top comments (9)

Collapse
 
azrikahar profile image
Azri Kahar

Postwoman.io seems to fit the description. It basically is a browser based version of Postman.

Collapse
 
alediaferia profile image
Alessandro Diaferia

That looks great. How does it avoid CORS when performing web requests?

Collapse
 
azrikahar profile image
Azri Kahar

You can go to the Settings and enable Proxy. It mitigates the CORS issue, as mentioned in it's official wiki.

Thread Thread
 
alediaferia profile image
Alessandro Diaferia

My bad, I thought CORS was gonna be much more restrictive than it actually is.

Collapse
 
nialljoemaher profile image
Niall Maher

Did you think of doing something like a PWA? Or do you need the app to have access to the file system?

Collapse
 
alediaferia profile image
Alessandro Diaferia • Edited

No need for file system access. But will need to make requests to any URL the user types in the app so I'm not sure how that plays out with CORS on PWAs.

Collapse
 
alediaferia profile image
Alessandro Diaferia

I was having a look at Electron or browser extensions. Thinking of giving Electron a try but wanted to hear some perspectives from you.

Collapse
 
morgantmsn profile image
morgantmsn • Edited

Electron could be a solution if you really need a packaged app. Maybe a missunderstood your question but why not just host it on firebase hosting or another hosting provider. I deploy react apps this way and I'm happy with it but you could do the same thing without any framework, you could even combine it with github action or other ci/cd (gitlab etc ...) to build and deploy on push. (After reading some comments, If the app does http request to server which don't have cors open it don't seems to be an option.

Collapse
 
azrikahar profile image
Azri Kahar

Insomnia is built using Electron, and is similar to Postman but less "bloats" in comparison.