Server for icarus.
Make sure you are in the /server
directory. Then, run npm install
to download the latest node dependencies. To run the server, just run node server.js
. Make sure you have set up the database and imported the latest data. Check out the data README file to see how to do this.
Node |
Type |
Description |
distinct |
object<array<string>> |
An object containing certain columns as keys and an array of strings representing the distinct values of that column as the value. |
range |
object<tuple<int>> |
An object containing certain columns as keys and an object with keys ceil and floor representing the max and min value of that column. |
maxRows |
int |
The total number of events in the database. |
Node |
Type |
Required |
Description |
date |
tuple<int> |
true |
An object containing the high and low ends of the date range. |
fatalities |
tuple<int> |
true |
An object containing the high and low ends of the fatalities range. |
injuries |
tuple<int> |
true |
An object containing the high and low ends of the injuries range. |
source |
string |
false |
Which government database to retrieve events from. |
investigationType |
string |
false |
Whether the event is an incident or an accident. |
aircraftCategory |
string |
false |
The type of aircraft involved in the event. |
Node |
Type |
Description |
activeRows |
int |
The number of events that are not NULL for the specified parameters. |
years |
array<year> |
An array of year objects that contains totals for each year. |
Node |
Type |
Description |
year |
string |
A string representation of the year. |
events |
int |
The total number of applicable events that occurred in the given year. |
fatalities |
int |
The total number of fatalities from applicable events that occurred in the given year. |
injuries |
int |
The total number of injuries from applicable events that occurred in the given year. |