Where to place DDPGracefulShutdown?

Im trying to add https://github.com/meteor/ddp-graceful-shutdown to our code, but it states that You should call this from top level code as soon as possible; this means that it will run before the Meteor webapp package starts listening. If it is created after connections already exist, they will not be tracked. so I was wondering where should I add the code? anyone has done it successfully?

Thanks

I believe what this means it don’t put it inside something like Meteor.startup()

Thanks Kelly, will try it out! It was indeed confusing, lets hope it works.

1 Like