Giter Club home page Giter Club logo

ip's Introduction

๐ŸŒŽ Ip

Node.js CI License: MIT Open Source Love svg1

whatismyipaddress.com in just a few lines of code.

If the IP address was found, the lookup method returns an object with the following structure:

// https://ip.jaw.dev/?geo=true
// https://ip.jaw.dev/?geo=true&json=true
{
   ip: '127.0.0.1',               // ip address
   range: [420, 69],              // <low bound of IP block>, <high bound of IP block>
   country: 'XX',                 // 2 letter ISO-3166-1 country code
   region: 'RR',                  // Up to 3 alphanumeric variable length characters as ISO 3166-2 code
                                  // For US states this is the 2 letter state
                                  // For the United Kingdom this could be ENG as a country like โ€œEngland
                                  // FIPS 10-4 subcountry code
   eu: '0',                       // 1 if the country is a member state of the European Union, 0 otherwise.
   timezone: 'Country/Zone',      // Timezone from IANA Time Zone Database
   city: "City Name",             // This is the full city name
   ll: [420, 69],                 // The latitude and longitude of the city
   metro: 420,                    // Metro code
   area: 69                       // The approximate accuracy radius (km), around the latitude and longitude
}

๐Ÿ’ป Development

Note

Nodejs version of this project is also available via git checkout node after pulling it down.

Clone the repository

$ git clone https://github.com/wajeht/ip.git

Copy .env.example to .env

$ cp .env.example .env

Install dependencies

$ go install

Run development server

$ go run .

Test the application

$ go test

๐Ÿ“œ License

Distributed under the MIT License ยฉ wajeht. See LICENSE for more information.

ip's People

Contributors

wajeht avatar

Watchers

 avatar

ip's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.