You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/MelihYanalak/weather-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/MelihYanalak/weather-api

v0.0.0-20240426070829-e6cb5dcd73c6
Source
Go
Version published
Created
Source

Weather API

This repository contains a simple Go project that provides information about weather conditions inside a given Market.

Getting Started

These instructions will guide you through setting up and running this project on your local machine or docker.

Installation

Local

Prerequisites

Before you begin, ensure you have Go installed on your system. You can download it from golang.org.

You should have tile38 server running on your system and define environment variable TILE38_HOST such as TILE38_HOST=localhost:9851. You can download it from tile38.com

You should have Redis server running on your system and define environment variable REDIS_HOST such as TILE38_HOST=localhost:6379. You can download it from redis.io

Docker

Prerequisites

Before you begin, ensure you have Docker installed on your system. You can download it from docker.com.

Running docker containers

docker-compose up --build

Populating Database

Before you begin, ensure you have Python installed on your system. You can download it from python.org.

In order to initialize tile38 database by populating with example data, you can run the python script in path scripts/import_data_tile38.py while tile38 server is running on your environment.

Before running the script make sure you have installed Redis for python.

pip install Redis
python import_data_tile38.py

Usage

After running the program on your system, you can send request to server with required parameters. If you have curl installed on your system (Curl) :

curl -X GET -H "Content-Type: application/json" -d "{\"lat\": 41.13, \"long\": -74.18}" http://localhost:8080/weather

FAQs

Package last updated on 26 Apr 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