To run scripts in Sails, one just needs to sails run SCRIPT_NAME
, where SCRIPT_NAME
is the file name (minus extension) in the scripts
folder.
Command | File | Inputs | Description |
---|---|---|---|
|
create-admin.js |
|
Create an ADMIN user in the configured datastore. Can only be run once. For safety, if there is an active admin user found, the script will halt. The API endpoints must be used from that point forward. |
|
datastore-wipe.js |
|
Wipe the entire datastore this instance is connected to. Will be asked multiple, random questions to prevent disaster. WILL NEVER RUN ON PRODUCTION FOR SAFETY REASONS! |