A majority of the data is currently sourced from r-spacex/SpaceX-API and Open Weather Map API using the Apollo GraphQL Client.
For the client to be able to retrieve information it needs this spacelaunch-stats-server See the spacelaunch-stats-server GitHub page on any information regarding the server.
After downloading this project, run:
npm install
To be able to run this project you will have to create a .env file and fill it with your own keys/links, the following are required:
- SPACEX_API_V3_URL='https://api.spacexdata.com/v3/'
- OPEN_WEATHER_MAP_API_KEY: api key from Open Weather Map
- OPEN_WEATHER_MAP_API='https://api.openweathermap.org/data/2.5/'
Optional:
- ENGINE_API_KEY: This is the engine api key from the Apollo Platform (if not used, remove
engine: {apiKey: process.env.ENGINE_API_KEY}
from server.js)
In the project directory, you can run:
npm run server
Spins up a development Node js server with nodemon
Open http://localhost:5000/graphql to view the GraphQL interface in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
npm run build
Transpiles and minfies all ES6 to JS optimized for Node js