Install modules:
npm install
Run application:
npm start
Example endpoints:
-
localhost:5000/list
-
localhost:5000/count
-
localhost:5000/stats
-
localhost:5000/search
search arguments:
- king - name of attacker or defender king (example: localhost:5000/search?king=Joffrey/Tommen Baratheon )
- location - battle location (example: localhost:5000/search?location=Riverrun )
- type - battle type (example: localhost:5000/search?type=ambush )
search route supports combination of arguments:
localhost:5000/search?type=ambush&king=Joffrey/Tommen Baratheon
This application also is on Heroku platform:
https://enigmatic-chamber-75142.herokuapp.com/
All data about battles placed to https://mlab.com/