Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proof of concept of Sandstorm support
- Loading branch information
1 parent
9b398bc
commit df16424
Showing
11 changed files
with
114 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
|
||
private/conf.js | ||
private/production.js | ||
.meteor-spk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ linto:jquery-ui | |
copleykj:livestamp | ||
ongoworks:speakingurl | ||
yasaricli:slugify | ||
kenton:accounts-sandstorm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Sandstorm support is a proof of concept only | ||
isSandstorm = Meteor.settings && Meteor.settings.public && Meteor.settings.public.sandstorm; | ||
|
||
if (isSandstorm) { | ||
Meteor.subscribe('boards', function() { | ||
var board = Boards.findOne() | ||
Router.go("Board", { | ||
boardId: board._id, | ||
slug: board.slug | ||
}); | ||
}) | ||
} | ||
|
||
Blaze.registerHelper("isSandstorm", function() { | ||
return isSandstorm; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
@0xb49ebaaf160644ac; | ||
|
||
using Spk = import "/sandstorm/package.capnp"; | ||
# This imports: | ||
# $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp | ||
# Check out that file to see the full, documented package definition format. | ||
|
||
const pkgdef :Spk.PackageDefinition = ( | ||
# The package definition. Note that the spk tool looks specifically for the | ||
# "pkgdef" constant. | ||
|
||
id = "2ps3tfnka33nvxwjpw3nm48jyz6zwezg7ekghq3ucx3192z3sng0", | ||
# Your app ID is actually its public key. The private key was placed in | ||
# your keyring. All updates must be signed with the same key. | ||
|
||
manifest = ( | ||
# This manifest is included in your app package to tell Sandstorm | ||
# about your app. | ||
|
||
appVersion = 0, # Increment this for every release. | ||
|
||
actions = [ | ||
# Define your "new document" handlers here. | ||
( title = (defaultText = "New Metrello board"), | ||
command = .myCommand | ||
# The command to run when starting for the first time. (".myCommand" | ||
# is just a constant defined at the bottom of the file.) | ||
) | ||
], | ||
|
||
continueCommand = .myCommand | ||
# This is the command called to start your app back up after it has been | ||
# shut down for inactivity. Here we're using the same command as for | ||
# starting a new instance, but you could use different commands for each | ||
# case. | ||
), | ||
|
||
sourceMap = ( | ||
# The following directories will be copied into your package. | ||
searchPath = [ | ||
( sourcePath = ".meteor-spk/deps" ), | ||
( sourcePath = ".meteor-spk/bundle" ) | ||
] | ||
), | ||
|
||
alwaysInclude = [ "." ] | ||
# This says that we always want to include all files from the source map. | ||
# (An alternative is to automatically detect dependencies by watching what | ||
# the app opens while running in dev mode. To see what that looks like, | ||
# run `spk init` without the -A option.) | ||
); | ||
|
||
const myCommand :Spk.Manifest.Command = ( | ||
# Here we define the command used to start up your server. | ||
argv = ["/sandstorm-http-bridge", "4000", "--", "node", "start.js"], | ||
environ = [ | ||
# Note that this defines the *entire* environment seen by your app. | ||
(key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"), | ||
(key = "METEOR_SETTINGS", value = "{\"public\": {\"sandstorm\": true}}") | ||
] | ||
); |