Created
June 24, 2014 06:59
-
-
Save akfish/c5d850189049d85ea28e to your computer and use it in GitHub Desktop.
Shared object in sea.js
This file contains hidden or 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
define (require, exports, module) -> | |
# Get shared object container | |
shared = require './shared' | |
# Get things out | |
# As long as this code is run after producer, everything will be there | |
console.assert shared.flag? | |
console.assert shared.flag | |
console.assert shared.doggy == 'wow' |
This file contains hidden or 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
define (require, exports, module) -> | |
# Get shared object container | |
shared = require './shared' | |
# Put things in | |
shared.flag = true | |
shared.doggy = 'wow' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment