Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/wbrefvem/weather-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/wbrefvem/weather-api

  • v0.0.0-20240328010015-2a6b244eb9dc
  • Source
  • Go
  • Socket score

Version published
Created
Source

Simple Weather Reporter

This tool is a web server that fetches data from OpenWeather and reports on the weather accordingly. Send it a request with the lattitude & longitude of a particular place, and you will receive a simple weather report in return.

Requirements

  • Go >=1.21

To use, clone this repo, set the env var OPENWEATHER_API_KEY to your API key and run the code:

$ OPENWEATHER_API_KEY=<key> go run main.go

This will lunch a web server that binds to port 8080 by default. This can be overridden with the env var OW_HTTP_PORT.

Requests must be directed to /weather, and query params for lat and long must be provided for lattitude and longitude, respectively, e.g.:

$ curl localhost:8080/weather\?lat=40.7128\&long=-74.0060
The weather in New York is mist, and the temperature is cold.

FAQs

Package last updated on 28 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc