Space personal site that shows cool content about SpaceX missions and NASA's multimedia. New features are in progress.
This is a small fullstack JavaScript application I made to practice. It uses React in the front and connects through Apollo to a simple Express GraphQl middleware to request field specific data from NASA's and SpaceX rest APIs. Feel free to fork the project or test open graphiql endpoint to request data from both APIs (limited to 20 requests).
To begin working locally run the dev script. This will fire concurrently both the server and the client.
# Install dependencies (server & client)
npm install
cd client && npm install
# Run server & client (:3000 & :5000)
npm run dev
To deploy just run the start script and it will take care of everything. Optional scripts:
# Build for production (Builds into server ./public)
cd client && npm run build
# Graphiql - http://localhost:5000/graphql
You will find full model types in the schema.js file under /app
.
For example to request all SpaceX missions, the GraphQl query would look something like this:
lanzamientos {
flight_number
mission_name
launch_date_local
launch_success
}
- Apollo Client
- GraphQl Models
- GraphQl Queries
- React