meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 367 forks source link

app-prod-security package #145

Closed peterpetre closed 7 years ago

peterpetre commented 8 years ago

Hello, could you explain me how can i use it?

Package.describe({
  summary: 'Loads some useful packages for security, but only in production',
  prodOnly: true,
  documentation: null,
});

Package.onUse(function(api) {
  api.versionsFrom('1.2.1');

  api.use([
    'browser-policy',
    'force-ssl',
  ]);
});
hwillson commented 7 years ago

Sure - the local app-prod-security package is really just an umbrella package, that when included will include the other packages listed as dependencies (in this case browser-policy and force-ssl). It was created this way to leverage the prodOnly option that packages support, that when set will make sure this package (and its dependencies) are only bundled into production builds. This keeps them disabled (and absent) when running the todos app locally for example.