aero-laanc
- Use
git clone
to clone repo to your computer in CLI - Use
cd aero-laanc
to change directory to aero-laanc - Use
npm install
to install dependencies - Create MySQL database named _aeronyde
- Edit config/config.js to match your database username, password, and port if necessary
- Use
export NODE_ENV=development
to set your environment to development. Confirm setting usingecho $NODE_ENV
- Use
npm start
to run the project
Tests are setupp to use Mocha with the Chai assertion library. Tests are located in the ./test directory.
#run mocha tests in ./test directory
$ npm test
Flight Plan Routes https://documenter.getpostman.com/view/4459856/RWTiveMd
Run one of the below scripts to obtain an update locally and on Mapbox to the defined tile set, run from the root ./ directory .
#path: ./mapbox/faaFiles/National_Security_UAS_Flight_Restrictions.geojson
#tileSet: frz
$ npm run geo:nsurf
#path: ./faaFiles/FAA_UAS_Facility_Map_Data_V2.geojson
#tileSet: facility_map
$ npm run geo:uasfm
#path: ./faaFiles/FAA_UAS_Facility_Map_Data_V2.geojson
#tileSet: facility_map_label
$ npm run geo:uasfm2
#path: ./mapbox/faaFiles/Airports.geojson
#tileSet: airports
$ npm run geo:airports
#path: ./mapbox/faaFiles/Stadiums.geojson
#tileSet: Stadiums
$ npm run geo:stadiums
#path: ./mapbox/faaFiles/Class_Airspace.geojson
#tileSet: class_airspace
$ npm run geo:classairspace
#Get current statuses of files being upload to Map Box from AWS
$ npm run geo:status
Http Logs are accomplished at the http request level using Morgan. Log files are in /log/access.log
Activity Logs are maintained in the database log table. All activity should be logged using the user_id and a string to describe the activity. The user_id may be null when the user_id is not known. Activity is a JSON field for future expansion but may be a simple string for now.
Example:
db.Log.create({user_id:null, activity: "FAA Token Shown"}).then()
NOTE - Make sure you have required the models in all files using the log const db = require('../models')
Current configuration utilizes the documentation.js pacakage that uses comments in the code to generate docs docs are located in the ./docs folder, open index.html after running the below script.
npm run docs
The pre-push NPM package was utilized to modify .git/webhooks
so it will look at the prepush section of the scripts in Package.json
. The scripts in this section will run prior to any push to Github, currently Mocha tests are being run, if the test fails your push to Github will fail. Tests are currently minimal in nature but in the future Unit and E2E tests can be added to the ./test
directory for CI.