SpaceX-API JavaScript Wrapper
npm install --save spacex-js
Note: spacex-js depends on fetch()
being defined globally.
-
If you are using this in electron, it should work without any configuration.
-
If you are using this in Node.js, you will need to use
node-fetch
.Example:
global.fetch = require('node-fetch') const spacex = require('spacex-js')