127.0.0.1 Sweet 127.0.0.1 Build Status

127.0.0.1 Sweet 127.0.0.1 (a play on 127.0.0.1, localhost) is a tastefully simple app for getting the domain or IP address of any website you can imagine, using ipinfo.io and googlemaps api’s.

alt text

Motivation

I’ve always thought tools like speedtest.net that return your specific network information and location to be super cool, so I wanted to figure out how they actually work!

Features

  • RESTish API (not fully RESTful, only serves GET, POST requests) GET request to the /api endpoint returns a JSON response for your own IP, and a POST request to the /api endpoint, which must include the domain/ IP as the variable “body” in the JSON form body, returns a JSON response for the requested domain.
  • Returns and maps the domain/ IP location information on Google Maps along with additional meta-data related to the IP
  • GET endpoint: https://home-sweet-home-ip.herokuapp.com/api
  • POST endpoint: https://home-sweet-home-ip.herokuapp.com/api with {“body” : “domain”} as request.body

Technology

  • React and JavaScript on the frontend
  • Styled with React-Bootstrap
  • NodeJS for runtime environment
  • Express for the server
  • Axios for promise-based requests to external APIs
  • IPInfo.io and GoogleMaps APIs for data
  • Hosted with Heroku
  • Git and Github for version control
  • Travis for continuous integration

Usage

Clone the repository and create a .env file in the project root and add in your api keys from IPinfo.io and GoogleMapsAPI

REACT_APP_MAPS_API_KEY="YOUR_API_KEY"
ipinfoToken="YOUR_API_KEY"

To deploy locally and run server and client with concurrently:

npm run dev

License

The project is licensed under the MIT License.

GitHub

View Github