Git Product home page Git Product logo

Comments (12)

arboleya avatar arboleya commented on August 29, 2024

No problem @msolters, thanks for reporting.

I'll take a look at it later.

from electrify.

prasadnpawar avatar prasadnpawar commented on August 29, 2024

I am also having the same issue.
Error I can see when I enable developer tool
Uncaught TypeError: Cannot read property 'Electrify' of undefined
template.todos.js:2 Uncaught ReferenceError: Template is not defined
todos.js:1 Uncaught ReferenceError: Mongo is not defined
accounts-ui-unstyled.js:634 Uncaught ReferenceError: Spacebars is not defined

from electrify.

arboleya avatar arboleya commented on August 29, 2024

Hello, I've confirmed the problem, looking for the cause tough.

from electrify.

arboleya avatar arboleya commented on August 29, 2024

@prasadnpawar @msolters

Closing, fixed in 1.3.5. Please update, and let me know if it works.

In case the problem persists, please reopen.

from electrify.

prasadnpawar avatar prasadnpawar commented on August 29, 2024

Errors are gone. Now it is working. Thanks Arboleya.
Now, I am curious to know about other stuff like how can I installed this on some other computer? where the Mongodb will be installed ? How can I see database collections? How can I update app without resetting mongodb database? Please point me to the correct direction if possible.

from electrify.

arboleya avatar arboleya commented on August 29, 2024

Good questions, lets see one by one in detail.

Let me know if it's clear.

How can I install this on some other computer?

You should have in mind that the final app is an Electron App.

It will be a .app for OSX, and a folder with files for Windows/Linux.

You can then build installers, like .msi (win) .dmg (osx) .deb (linux) and
so on, by using tools that create these installers, i.e.:

https://github.com/LinusU/node-appdmg

Where the Mongodb will be installed?

MongoDB isn't installed, instead it's distributed in a standalone way, Electrify
starts/stops MongoDB during the app initialization / exits process. The same
happens with the local Meteor server.

The binaries of mongo and mongod lives inside the .electrify/bin folder.

However after packaging the app, everything inside .electrify folder is moved
to the internals folder of the Electron app, which is:

OSX: .dist/your-app-name/your-app-name.app/Contents/Resources/app
WIN: .dist\your-app-name\resources\app (linux is similar to this)

So you'll find the binaries inside Resources/app/bin folder inside the
packaged app.

The actual DBDIR used by Mongo to write its databases to disk will exist only
inside the packaged app - it'll created the first it runs and will exist inside
the Resources/app/db dir.

How can I see database collections?

Having the packaged app up'n'running means that MongoDB is up and accessible,
however you need to know in which port it's running to connect to.

Electrify assures MongoDB will use a currently free/unused port on the user's
machine, therefore the port in which it runs is not predefined. It'll
potentially change everytime the app is started.

To get this port, you can simply run the app from the Terminal and see its
output -- it is, you cannot just double-click the generated .app or .exe
files, because this way you won't see any output.

Osx terminal:

# just type the full path to the ELECTRON binary and press ENTER
.electrify/.dist/your-app-name/your-appname.app/Contents/MacOS/Electron

Windows CMD/Powershell etc:

# just type the full path to the .EXE file binary and press ENTER
.electrify/.dist/your-app-name/your-appname.exe

Watch out the logs, and you'll get the current MongoDB port. Mongo's output
will be something like

[initandlisten] waiting for connections on port 11235

With this, you can use tools such as RoboMongo to
access your database with a Graphical User Interface, or connect via Terminal
as well.

How can I update app without resetting mongodb database?

This leads to two differente cases:

1. Shipping new versions to users

Right now there's no way to preserve the database upon newer installs.

Surely it's not ideal and preserving database between app updates makes total
sense for next/future release.

2. Packaging app multiple times

It's important to know that your Meteor's mongo database is not copied to your
packaged app. The packaged app always starts with a blank database, that is
created during it's first initialization.

So you have to build a kind of seeding approach, that seeds the needed data on
the database in case it doens't exist yet.

if(!Posts.find().count()) {
  Posts.create({/* ... */});
}

But then if you package your app again, the .electrify\.dist folder is
completely removed and rebuilt, making your previous database go away. Much in
the same way it'll happen with newer version shipped to users.

from electrify.

prasadnpawar avatar prasadnpawar commented on August 29, 2024

Thanks for the prompt reply. But I have a one more question that if it is not possible to update the app without resetting mongon database then is it possible to take backup of db and after updating app (installing new version) restore it again? If yes the how?

from electrify.

arboleya avatar arboleya commented on August 29, 2024

Yes, potentially. Just backup/restore the dbdir, it should work.

OSX: .dist/your-app-name/your-app-name.app/Contents/Resources/app/db
WIN: .dist\your-app-name\resources\app\db

from electrify.

msolters avatar msolters commented on August 29, 2024

Yes, I too can confirm that the Windows builds are now functioning properly.

from electrify.

arboleya avatar arboleya commented on August 29, 2024

tks 👍

from electrify.

yjose avatar yjose commented on August 29, 2024

@arboleya i have the same problem that the final .exe doesn't actually render anything.
-note that i update electrify to electrify-update-test

thank you to help me to resolve this problem

from electrify.

 avatar commented on August 29, 2024

thanks in advance..
i am using v2.1.4
@arboleya i have same problem as @msolters.
.exe dosn't render anything.

from electrify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.