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

github.com/chitranshubisht/weather-tracker-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/chitranshubisht/weather-tracker-api


Version published
Created
Source

Weather Tracker API 🌤️

Welcome to the Weather Tracker API project! This API fetches weather data from OpenWeatherMap and provides temperature information in Kelvin, Celsius, and Fahrenheit for a given city.

Prerequisites 📋

Before running the project, ensure you have the following installed:

  • Go (Golang)
  • Git

Getting Started 🚀

Follow these steps to set up and run the Weather Tracker API:

1. Clone the Repository 🌀

git clone git@github.com:chitranshubisht/weather-tracker-api.git
cd weather-tracker-api

Setting Up the Weather Tracker API

Set Up API Configuration 🛠️

Create a .apiConfig file in the root directory with your OpenWeatherMap API key:

{
    "OpenWeatherMapApiKey": "your_api_key_here"
}

2. Build and Run the API 🏃‍♂️

Run the following command to build and start the API locally at http://localhost:8080:

go run main.go

3. Access Weather Data 🌍

To access weather data for a specific city, make a GET request to:

http://localhost:8080/weather/{city_name}

Replace {city_name} with the name of the city you want weather data for. For example:

FAQs

Package last updated on 07 Jul 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