An open API service indexing awesome lists of open source software.

https://github.com/bmmunga/location-web-server

This simple web server uses an in-memory data store and exposes an API endpoint that responds to GET requests.
https://github.com/bmmunga/location-web-server

golang json restful-api webserver

Last synced: 2 months ago
JSON representation

This simple web server uses an in-memory data store and exposes an API endpoint that responds to GET requests.

Awesome Lists containing this project

README

        

# Location Web Server

Location-web-server is a simple web server that provides weather information and personalized greetings based on the client's IP address and location.

## Features

- Fetches client's IP address and geolocation.
- Retrieves current weather data for the client's location.
- Caches geolocation and weather data to reduce API calls.
- Exposes an API endpoint for personalized greetings.

## API Endpoint

### GET `/api/hello`

#### Query Parameters:
- `visitor_name` (optional): The name of the visitor (default: "Guest").

#### Response:
```json
{
"client_ip": "127.0.0.1",
"location": "New York",
"greeting": "Hello, Mark!, the temperature is 11 degrees Celsius in New York"
}