This document explains how cross-platform meteor apps work and how to compile them to run on Modulus.
Projects setup to compile for multiple platforms (ios and android) will need to
compile the client assets into a bundle for those platforms using Cordova as
part of the meteor build
step. This step must be done on OSX on your local
machine.
You'll need to provide information about the server using some CLI options:
$ meteor build --server leaderboard-45068.onmodulus.net --directory .modulus-deploy --architecture os.linux.x86_64
Replace the value of the --server
option with the URL for your project. This
should be the same URL that you will set for your ROOT_URL
.
This step will generate the bundles for each architecture with the correct URL for interacting with the server-side piece of the app.
Open .modulus-deploy/bundle/programs/server/package.json
and add the node
version:
"engines": { "node": "0.10.40" },
When the build
was run, all of the required packages were added to the
generated bundle so it's incredibly important to deploy with the
--include-modules
(-m
) flag.
$ modulus deploy --include-modules .modulus-deploy/bundle
This will deploy the server-side bundle only. The bundle may still be very large because all of the packages are included.