A couple of years ago as a CS student learning all sorts of āproperā programming languages, C#, Java, C++ etc, I would have laughed at this proposal much due to the weak typing in JS and a few other things, which still bugs me sometimes. However, after fiddling with Meteor(And python for my masterās), nothing would please me more!
Iām working with a team of folks on a free + open source tool designed to support collecting and managing digital media. It lets you easily stitch together bits of media you collect from across the web into creative works on an infinite canvas. Weāre using Meteor as a proof of concept for a lot of the UX assumptions we want to test. With it, weāve been able to iterate pretty quickly but ultimately we felt a native desktop client is a better fit for our use case. We recently took inspiration from the Kitematic app and decided to try and use Electron to wrap what weāve built for web as a desktop application that would be distributable as a dmg. We adapted the Kitematic scripts to our project that:
- Install Electron dependencies
- Runs the meteor web app as a desktop app using Electron
- Packages the meteor app as an installable desktop application
You can see our scripts here: https://github.com/parallelsio/core-modules/tree/master/desktop-app. The scripts are definitely a work in progress. Cross compatibility would be awesome but unfortunately we havenāt tested on much other than Mac. Hope it helps someone interested in getting started with Meteor and Electron.
If anyone is interested, weāve created a nice desktop client app using electron for our https://rocket.chat project.
All the source code is available at https://github.com/RocketChat/Rocket.Chat.Electron
Itās been a bit of a challenge, I have the CLI command added but a big part of the work is that it has to be tested on multiple platforms. Windows can be a pain sometimes, hopefully lots of people move to windows 10 which is an okay operating system
Iām using it to make a simple game platform. The game is an RTS/MMORPG mix, and Iām just curious to see if JavaScript and meteor can handle it. Ideally, I would also like to add an installer if thatās even possible to do
Makes sense.
If you get to the point where youād like to open it up for people to help, Iād be interested!
I have already been testing my current meteor project in desktop mode using arboleya:Āelectrify package and it has been pretty good on windows and ubuntu.
Absolutely, no learning curve.
Nice!! Iām going test this now!!!
If you guys want a kinda easy solution, someone here made a package to build the client of a meteor application.
In order to use it, just make a DDP.connect
to a remote server. Then you just build the client. In the directory where you built it, add a main.js
and a package.json
and, youāre done!
The one caveat is you have to make sure ios
and android
arenāt in the platforms before building, or provide a --mobile-server
Hereās a quick example
Haha,
that would be me
I also use electron and its the best hybrid desktop app out there.
Using my meteor-build-client, its extremly simply to use meteor without any complicated modification in an electron app.
I also wrote a gulp script for our desktop app, which uses electron-packager alongside my meteor-build-client, take a look here: https://github.com/ethereum/mist/blob/wallet/gulpfile.js
Additionally i found a way to add minimongo to the node.js backend of electron and sync it with my frontend minimongo using electrons IPC messages: https://github.com/ethereum/mist/tree/wallet/modules (look at the syncMinimongo.js and minimongoDb.js file)
I use persistent-minimongo to store any collection in local storage, though iām thinking about a way to store it in the browsers indexedDB instead. This way you can use a reactive minimongo, sync it to the backend and also have it persisted, so you donāt even need a meteor web server at all.
I hope that helps anybody to digg deeperā¦
But in short its basically:
- create example electron app
- put your app in an
interface
(or whatever) folder - make sure your
myWindow.loadUrl()
in yourmain.js
points tohttp://localhost:3000
- run meteor form that folder and electron from the top folder
If you want to deploy, simple bundle the app using:
$ cd interface && meteor-build-client ../interface-build --path ""
And change the myWindow.loadUrl(dirname + '/interface-build/index.html')
Thats it!
EDIT: @corvid nice! i just saw your meteor-electron-client, which basically does exactly the same
Hello guys, I have some doubts about Meteor on desktop, could you guys help me?
Im using Electrify packageā¦ but im wondering how can I take advantage of this situation to write Meteor apps that have access to native API such as writing/reading to serial ports or writing/reading files on the clientā¦ How can I do this?
WOW! Who can spot the Meteor app?
Tip: is Rocket.Chat
All source available at:
Just saw on the Github for @sircharleswatsonās project that he wonāt be working on Electrometeor anymore
Anyone taking up the reigns on the meteor add-platform desktop
dream?
In case you missed it, thereās a single-package installer that will wrap your app in Electron.
Nice to see some more Electron builders for meteor, electrify was good but the developer seems to have stopped updating the package. It still works but is less out the box and requires some work arounds these days.
@frozeman, did you ever succeed in making a server-less offline desktop app? Using just client-side code and node.js for storing mongo on the backend without the meteor web server?
I never had a need for a backend, but it should work. I build DApps, which use the blockchain as a backend. -> http://dapps.ethercasts.com