Skip to content

serverless geolocation API powered by Cloudflare Workers

License

Notifications You must be signed in to change notification settings

servusdei2018/galileo

Repository files navigation

galileo CircleCI

Galileo is a Cloudflare Worker that provides geolocation data for incoming requests.

Getting Started

Installation

  1. Clone the repository:

    git clone https://github.com/servusdei2018/galileo.git
    cd galileo
  2. Install dependencies:

    npm install

Development

To start a local development server:

npm run dev

Deployment

To deploy the worker to Cloudflare:

npm run deploy

Ensure you've configured your Cloudflare account and namespace in the wrangler.toml file before deploying.

Testing

To run tests:

npm run test

Usage

Once deployed, make a GET request to your worker's URL:

curl -X GET https://your-worker.your-domain.workers.dev

The response will be a JSON object containing geolocation data:

{
	"ip": "8.8.8.8",
	"country": "US",
	"region": "California",
	"city": "Mountain View",
	"latitude": "37.3861",
	"longitude": "-122.0839",
	"timezone": "America/Los_Angeles",
	"asn": 15169,
	"isp": "Google LLC"
}

License

Galileo is distributed under the MIT License. Refer to the LICENSE file for details.

About

serverless geolocation API powered by Cloudflare Workers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published