cesium-go
is a reverse proxy server with caching capabilities, designed to serve tiles from Google Maps API. It uses BadgerDB for caching responses to improve performance and reduce redundant API calls.
-
Clone the repository:
git clone https://github.com/tbxark/cesium-go.git cd cesium-go
-
Install dependencies:
go mod download
-
Build the project:
go build -o cesium-go
Create a config.json
file with the following structure:
{
"address": ":8080",
"cache_dir": "./cache",
"api_keys": ["YOUR_GOOGLE_MAPS_API_KEY"]
}
address
: The address on which the server will listen.cache_dir
: The directory where the cache will be stored.api_keys
: A list of Google Maps API keys to be used by the proxy.
Start the server with the configuration file:
./cesium-go -config=config.json
GET /
: Serves theindex.html
file.GET /{path}
: Proxies the request to Google Maps API and caches the response.
This project is licensed under the MIT License.