https://github.com/drewmoore/asteroid-tracker
A web API for tracking asteroids, meteors, and other objects near the Earth
https://github.com/drewmoore/asteroid-tracker
Last synced: about 2 months ago
JSON representation
A web API for tracking asteroids, meteors, and other objects near the Earth
- Host: GitHub
- URL: https://github.com/drewmoore/asteroid-tracker
- Owner: drewmoore
- Created: 2017-06-28T07:07:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-30T05:23:27.000Z (almost 9 years ago)
- Last Synced: 2025-12-07T18:57:05.540Z (6 months ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/drewmoore/asteroid-tracker)
# Asteroid Tracker
This Web API allows users to search NASA's database for objects close to Earth's orbit.
## Getting started
- Clone or fork the repository.
- Set the environment variable `NASA_KEY` with your NASA API key.
- Run `yarn`
- Make sure that MongoDB is installed and the server is running.
- You can optionally set the environment variable `MONGO_PORT` to whichever port your Mongo server is listening. The default is 27017.
- Seed the database with data from NASA's API by running `npm run fetch_neos`.
- Start the server with `npm run serve`.
- Run the tests with `npm test`.
## Technologies Employed
- Express
- The choice of Express for a simple, lightweight API server felt natural.
- The un-opinionated and tabula-rasa-oriented approach of the node server presents a good opportunity to demonstrate my own sense of application structure.
- The combination of server-side Javascript with MongoDB's BSON brings with it a certain feeling of consistency.
- I had been trained in Express, but it had been a while since I had worked with it. I wanted to take an opportunity to revisit the framework.
- MongoDB
- MongoDB's ability to store and work with a variety of data types makes it a beneficial tool for the assignment. Mongo's abilities to perform bulk writes and aggregates were particularly useful in saving API data and grouping asteroids by date.
- Mongoose
- I included this ORM for simple document validations and for better code maintainability through built-in CRUD-related methods.
- Mocha with Chai
- Testing is always essential, and these are two proven tools.
- Chai provides useful tools for acceptance testing in addition to its human-readable syntax.