_spartan is a node application designed to secure node applications. Please ensure that you have all of the requirements in place before proceeding
requirements To use _spartan, you’ll need to have the following installed:
npm init
to accept the defaults be sure to use the ‘-y’ flag
git init
npm install -g spartan-shield
/usr/bin/
requires elevated permissions. To overcome this, install as sudo npm install -g spartan-shield
. If necessary, you should still be able to install and run it locally without the global flag_spartan init
creates a policy based upon your answers to a few questions. Use ‘y’ to generate a default policy and boilerplate codeAssuming there are no errors, you will see 3 new files/folders in your local directory:
_spartan throws ‘ENOENT’ (no entity) errors for each of the following conditions
npm init
or make sure to run _spartan from the same location as package.json_spartan -D
and get this error, then _spartan can’t find the default policy (packaged with the module); the quickest way to deal with this is to pull the default policy from github by running _spartan -R
which restores the factory default policy
Default policy restoration requires wget. If you don’t already have this installed, use homebrew or similar to get this package
Other potential installation errors
See _spartan help section for additional error information