2014-06-27 02:09:39 +08:00
|
|
|
###
|
|
|
|
Meteor.startup(function () {
|
|
|
|
// Add seed data if first time server starting
|
|
|
|
CreateSeedData();
|
|
|
|
|
|
|
|
// Publish data collections
|
|
|
|
PublishCollections();
|
|
|
|
|
|
|
|
// Set collection permissions
|
|
|
|
SetCollectionPermissions();
|
|
|
|
|
|
|
|
});
|
|
|
|
###
|
|
|
|
|
|
|
|
Meteor.startup ->
|
|
|
|
console.log "server start"
|
|
|
|
|
|
|
|
#remove all data
|
2014-06-27 22:38:08 +08:00
|
|
|
Meteor.Users.remove({})
|
|
|
|
console.log "cleared Users Collection!"
|
2014-06-27 23:37:33 +08:00
|
|
|
Meteor.Chat.remove({})
|
2014-07-02 22:47:22 +08:00
|
|
|
console.log "cleared Chat Collection!"
|
2014-07-03 23:52:43 +08:00
|
|
|
Meteor.Meetings.remove({})
|
|
|
|
console.log "cleared Meetings Collection!"
|
2014-06-27 02:09:39 +08:00
|
|
|
|
|
|
|
# create create a PubSub connection, start listening
|
|
|
|
Meteor.redisPubSub = new Meteor.RedisPubSub(->
|
|
|
|
console.log "created pubsub")
|