Socket
Book a DemoInstallSign in
Socket

github.com/LamichhaneBibek/weather-api

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/LamichhaneBibek/weather-api

Source
Go
Version
v0.0.0-20240210151957-14821f2958eb
Version published
Created
Source

Weather API

This is a simple Go application that provides weather information using the WeatherAPI. It includes a web server and a frontend component written in Templ for generating dynamic HTML.

Project Structure

  • main.go: Contains the main entry point of the application.
  • weather.templ: Templ file for the weather forecast frontend.
  • Makefile: Makefile for generating Templ code and running the application.
  • go.mod: Go module file specifying project dependencies.

Getting Started

  • Install Go on your machine: https://golang.org/doc/install

  • Clone this repository:

    git clone https://github.com/LamichhaneBibek/weather-api.git
    
  • Navigate to the project directory:

    cd weather-api
    
  • Run the following command to generate Templ code and start the application:

    make run
    

    This command will generate Templ code and run the web server. Open your browser and go to http://localhost:8080 to see the weather forecast.

Project Dependencies

  • Templ: Templ is used for generating dynamic HTML content in this project.
  • WeatherAPI: The external API used to fetch weather information.

Contributing

Feel free to contribute to this project by opening issues or creating pull requests. Your feedback and contributions are welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

FAQs

Package last updated on 10 Feb 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