4commerce-technologies-AG / meteor

This is a fork of Meteor.js to support not yet official enabled architectures with an universal bundler. Meteor is an ultra-simple, database-everywhere, data-on-the-wire, pure-Javascript web framework. Read additional information about this fork at:
http://meteor-universal.tumblr.com/
Other
195 stars 16 forks source link

Bundle app on desktop and deploy to ARM device #35

Closed TomFreudenberg closed 8 years ago

TomFreudenberg commented 8 years ago

From Jeremy ( @JeremyBYU )

When I bundle an app on my desktop with the latest meteor (1.2) and try to deploy on my raspberry pi (1.2, forked ARM), its says I need a newer version of node. I get an error saying I need 0.10.40 or newer and the current node on the ARM fork is 0.10.29. Is the only way around this to bundle on my raspberry pi?

TomFreudenberg commented 8 years ago

Hi Jeremy ( @JeremyBYU )

I am sorry but you (mostly) can't currently bundle your app on your desktop and run it on your arm device afterwards. You need to build the tarball on the arm device as well in case of some native npm code which has to be compiled for the right platform. Currently meteor desktop builder can only create for x86 architectures.

So what you need to do is:

  1. Clone and install meteor arm fork on your device (e.g. to /usr/local/meteor)
  2. Copy source code of your app to your device (e.g. /home/myapp/src)
  3. Go into source folder cd /home/myapp/src
  4. Run /usr/local/meteor/meteor build --directoy /home/myapp
  5. Now you have bundled your app for an arm device
  6. Finish installation of necessary npms
  7. Go to folder cd /home/myapp/bundle/programs/server
  8. Run npm installation using dev_bundled npm /usr/local/meteor/dev_bundle/bin/npm install
  9. No you are ready to run your app with the dev_bundled node (currently 0.10.40)
  10. I guess you have already installed mongo via apt-get install mongodb and this is up and running
  11. Go to folder cd /home/myapp/bundle
  12. Start your app via MONGO_URL='mongodb://localhost:27017/myapp' ROOT_URL='http://localhost:3000' PORT=3000 /usr/local/meteor/dev_bundle/bin/node main.js

That should bring your app online.

Remarks:

  1. You do NOT need to install node on your system, the arm fork will download a compatible node release into dev_bundle
  2. You may also use the mongodb from within the dev_bundle but then you need to created your own mongodb.conf and startup scripts
  3. FIRST time meteor build will take its time because not only your sources but all necessary packages are prepared for your device.

Good luck Tom

JeremyBYU commented 8 years ago

Tom, Thanks for the help. I'm still getting the same issue when I bundle on the ARM device, namely that I need node 0.10.40 or newer. My node version (installed from this git repository yesterday) on my arm device is v 0.10.29.

You said above

Now you are ready to run your app with the dev_bundled node (currently 0.10.40)

Is that implying that you believe this meteor fork branch should install node 0.10.40. If thats the case then I guess something went wrong with my install!

EDIT: Just figured it all out. I just need to use node that came installed with meteor. Namely in $HOME/meteor/meteor/bin/node. This is the node version that is at 0.10.40.

I also installed mongodb. Wasnt sure if that got installed with this arm bundle

Everything seems to be working perfectly now. Boot up time is seconds instead of literally 25 minutes.

TomFreudenberg commented 8 years ago

Hi Jeremy, thanks for response.

Have fun Tom