Giter Site home page Giter Site logo

Plugins: Disable Mongo? about electrify HOT 5 CLOSED

arboleya avatar arboleya commented on July 22, 2024
Plugins: Disable Mongo?

from electrify.

Comments (5)

arboleya avatar arboleya commented on July 22, 2024

Hi, it's not possible.

MongoDB also starts very fast, I don't think it'd be too relevant. Unless you have some benchmark through different machines that shows otherwise.

Anyway, there's another point that is the size of the final app. If we remove the mongo and mongod binaries, the final app size will likely drop by 50mb.

The two plugins you find inside the lib/plugins folder are my first basic draft for a plugin API, so there's not much functionality yet. However I haven't thought about removing MongoDB.

Are you deploying your app already without MongoDB? Meteor doesn't complain about it? You use a null MONGO_URL or something? I've never did it before.

from electrify.

msolters avatar msolters commented on July 22, 2024

Thanks for the feedback. I will try to build some deployed versions that remove Mongo and see what I can get up and running. My problem is that these electrified apps seem to take quite a long time to start up. For instance, I have an i7 machine w/ 32GB of RAM -- and it takes 10-15 seconds for a simple leaderboard app to start, during which time Electron just has a blank white page.

from electrify.

arboleya avatar arboleya commented on July 22, 2024

Wow @msolters, 10-15 seconds seems a lot. Mine takes 1 or 2 seconds max with 2.5 GHz Intel Core i7 and 16 GB 1600 MHz DDR3. I need to check this.

About the white page that is rendered right away before everything is up and running, it's possible for you to configure a splash screen.

I haven't tested it but it'll look similar to this:

// .electrify/splash.html

var app       = require('app');
var browser   = require('browser-window');

var electrify = require('electrify')(__dirname, {});

var splash    = null;
var window    = null;

app.on('ready', function() {
  splash = new browser({
    // >>> your configs here
  });
  splash.loadUrl('./splash.html'); // >>> create the ".electrify/splash.html" file

  electrify.start(function(meteor_root_url) {
   splash.close(); // >>> or .destroy(), check what works for you
    window = new browser({
      width: 1200, height: 900,
      'node-integration': false
    });
    window.loadUrl(meteor_root_url);
  });

});

app.on('window-all-closed', function() {
  app.quit();
});

app.on('will-quit', function() {
  electrify.stop();
});

from electrify.

arboleya avatar arboleya commented on July 22, 2024

@msolters Have you seen any speed improvement during the startup of your app?

I've just released a new version some minutes ago, please update and check if got better for you.

As for the option to completely strip mongo away, I think it's not crucial at this time, nor it is something straightforward / documented.

I've found something here, but seems a little tricky:
http://stackoverflow.com/questions/18545905/meteor-without-mongo

So I'm closing this for now, hope your build is starting faster than last time your posted.

from electrify.

msolters avatar msolters commented on July 22, 2024

I haven't had much time to focus on this. I'll let you know if there is a marked improvement next time I get to implementing it.

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.