API Development Scripts:
command | description |
---|---|
npm run help |
Generates List of NPM Scripts you can run |
npm run start |
Runs API using forever service after running npm run cleanup |
npm run start:debug |
Starts the API in Debug Mode so you can see Console statements in terminal |
npm run stop |
Stop API when run from npm start using forever |
npm run cleanup |
Remove files & folders generated by API that are not apart of the code base |
npm run docs |
Generate JSDoc Documentation |
npm run docs:clean |
Remove the JSDoc Documentation Folder in ./static/docs/ |
npm run test |
Runs complete test suite of Linting, Unit Tests & Code Coverage Reports |
npm run lint |
Tests Javascript Code against Linting Rules |
npm run coverage |
Generate Code Coverage Reports and Run Unit Tests |
npm run check-coverage |
Check Coverage Reports against Minimum Requirements |
npm run migrate |
Migrate to Latest Database Schema |
npm run migrate:create |
Create new Migration Template file in ./app/seeders folder |
npm run migrate:rollback |
Roll Back Migration Changes |
npm run seed |
Run Seeders in ./app/seeders folder |
npm run seed:create |
Create new Seeder Template file in ./app/seeders folder |
npm run seed:rollback |
Undo Seeders |
npm run elasticsearch:create |
Create Elasticsearch Indexes |
npm run elasticsearch:update |
Update Elasticsearch Indexes |
npm run elasticsearch:delete |
Delete Elasticsearch Indexes |
npm run flatdb:download-all |
Downloads All Flat Database Files used for API |
npm run flatdb:geo-city |
Downloads and Unzips GeoLite2 City from MaxMind |
npm run flatdb:geo-country |
Downloads and Unzips GeoLite2 Country from MaxMind |
npm run make-config |
Runs during npm install and downloads sample local.json file if one was not already created |
npm run prepublish |
Runs any commands necessary before publishing API |
npm run postinstall |
This runs automatically after running npm install |
npm run redis:clearcache |
Clears Redis Cache |
npm run help
npm run help [regex]