Creating DMG file with Electron?

Has anyone been able to convert their WASP app into a DMG file using electron or something else?
7 Replies
kapa.ai
kapa.ai2w ago
Hi @Zuck. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain information about converting a Wasp app into a DMG file using Electron or any other method. I recommend checking the official Wasp documentation or their community support channels for more information. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Zuck, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
iRazvan2745
iRazvan27452w ago
So you want to run the wasp app in application ? Why not deploy it to a website and use chromium
Zuck
Zuck2w ago
@iRazvan2745 true! Haha I’m just experimenting
martinsos
martinsos2w ago
@Zuck interesting! Nope, we never tried. So Wasp app is static JS client, then nodejs server (for which we also give you Dockerfile but you don't have to use it), and it needs connection to the database. THat is it really. So if you would manage to wrap that up so electron can run it, it should workr, why not. I don't know enough about electron to say how hard is that to achieve: procuring the database, serving the client, oh and connect client to the server in the correct way, yeah right now they expect to communicate via http API so that sounds tricky hm. Maybe electron offers something there but I doubt it. What would be pretty cool is if, in the future, you voulf choose to generate your Wasp app as an electron app! We could spit out electron app directly, if we know you want it. But that is a bit out of scope at the moment, not a priority and is quite some work. I am curious, why are you interested in this? You think it might be a good fit for some ideas you have, to have it be a desktop app?
neogeofun
neogeofun2w ago
I don't know about DMG part but using Wasp to create an electron app should be rather straightforward and easy. That said, I see no reason why would you want an Electron app if all you are doing is running Wasp app on your local server. Assuming you put the whole Wasp app inside your Electron wrapper, you would still need to run it on some port to make your backend functional. Why not just use it how it is supposed to be used, and if you really need an Electron app have the Electron client call your server, it is honestly not a good idea to put all your business logic inside an Electron app anyway.
martinsos
martinsos2w ago
@neogeofun I appreciate your view here, but I would also love to hear the other side without presuming too much. Presuming too much is a good way to learn nothing: if you start with the assumption that your initial point of view is 100% correct one, you stop listening. I prefer approach where I state my opinion but also leave space for learning more about the other ideas: and often I learn quite a bit. In this case, I am quite confident I will learn. As for the details of the discussion: A lot of apps these days come with electron/desktop + web combo: Discord, Slack, some others (I guess :D). Wasp maybe is supposed to be used as a web app today, but not beacuse we think that is the only right way, but because we didn't have time to yet add support for other stuff. Not saying we will add support for everything out there, but I sure do wnat to learn about the use cases so we can make those decisions. I don't see the DX of electron app the same as the DX of locally running a Wasp app: if I need to distribute this app with non-developer users, and I am aiming for desktop-like experience, I would like it to be Electron app (or sometihing similar). That said, I didn't quite get all the ideas that you listed: I am not sure if putting Wasp in electron is straightforward (is it really? How would one go about that? I don't know a ton about Electron btw).
neogeofun
neogeofun2w ago
@martinsos I am not expert but I am working with Electron (not Wasp project), Electron is mostly a thin wrapper. You could run your Wasp app, and tell Electron to load url without actually opening a browser window. That's why it would be easy, just run Wasp as usual on some port and have Electron load it. It is also relatively easy to reverse engineer Electron apps. Discord/Slack etc. keep all their business logic on their servers, and you certainly don't want to store anything sensitive inside an Electron app. That said, if you are just building an open source project I guess there'd be no reason to hack it. My assumption is that Wasp requires a server to run, and its core benefits depend on being a monolithic app (there is an argument for bundling Wasp client alone with the electron app, but I suspect it'd be harder than writing a separate client for Electron). Also assumed this isn't open source / fun project. My advice is given with the assumption someone is building something as a for profit product.
Want results from more Discord servers?
Add your server