How do you restrict access to a Meteor site based on IP

I’ve just put it in file server/index.js
I haven’t used Meteor.startup

Which is defined in package.json

  "meteor": {
    "mainModule": {
      "client": "startup/client/index.js",
      "server": "startup/server/index.js"
    }
  },