Sandstorm is a platform for personal clouds that makes installing apps to your personal server as easy as installing apps to your phone.
Meteor is a revolutionary web app framework. Sandstorm's own UI is built using Meteor, and Meteor is also a great way to build Sandstorm apps.
This package provides a tool, meteor-spk
, which wraps Sandstorm's normal
spk
tool as well as Meteor's tools in order to easily package Meteor apps
to run on Sandstorm.
Currently, this tool only works on Linux. We may port to Mac OSX in the future.
You must install Sandstorm locally in order to get the spk
tool. The easiest
way to do that is:
curl https://install.sandstorm.io | bash
meteor-spk
from binariesDownload and unpack the binary distribution, e.g.:
mkdir -p ~/projects/meteor-spk
cd ~/projects/meteor-spk
curl https://dl.sandstorm.io/meteor-spk-0.6.0.tar.xz | tar Jxf -
cd meteor-spk-0.6.0
Add the directory to your $PATH
, or symlink the meteor-spk
script into
a directory in your $PATH
, e.g.:
ln -s $PWD/meteor-spk ~/bin
To package your existing Meteor app, do the following:
meteor-spk init
in your app's source tree.sandstorm-pkgdef.capnp
in a text editor. Read
the comments and fill in as appropriate. In particular you will probably
want to change the "new instance" action title.meteor-spk dev
to run your app in dev mode. For this to
work, you must be running a local Sandstorm server and your user account
must be a member of the server's group. The tool will connect to that
server and temporarily make your app available for testing. When done
testing, use ctrl+C in the terminal to stop.meteor-spk pack example.spk
to create a Sandstorm package file called
example.spk
. WARNING: You may want to place this file outside of your
source directory as otherwise Meteor will think it is part of the app
and will include it in the app bundle. This means if you repeatedly run
this command your package will keep including itself and become enormous.spk
to a Sandstorm server using the "Upload App"
button in the Sandstorm UI.meteor-spk
uses Mongo 3.0. Mongo 2.x does not work
well for Sandstorm apps as it pre-allocates far too much disk space
expecting a large database; Mongo 3.x mostly avoids preallocation. The
differences should be invisible to your app. Note that apps built with
previous versions of meteor-spk
can upgrade safely -- old grains will
automatically be migrated to Mongo 3 format on their first run.kenton:accounts-sandstorm
to integrate with Sandstorm's login system. (See also
jacksingleton:accounts-sandstorm-dev
to fake Sandstorm user info during development, so that you can use Meteor's auto-refreshing
dev mode outside of Sandstorm.)autopublish
and insecure
on! If all users have full access anyway, and the data set is limited to
one document, then there's no problem.meteor-spk
meteor-spk
from sourceCheck out this github repository. Note that you must use the --recursive
flag to ensure that submodules are cloned as well:
git clone --recursive https://github.com/sandstorm-io/meteor-spk.git
Run make
.
Add the directory to your $PATH
, or symlink the meteor-spk
script into
a directory in your $PATH
, e.g.:
ln -s $PWD/meteor-spk ~/bin