Socket
Book a DemoInstallSign in
Socket

github.com/JerryJeager/weather-location-api

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/JerryJeager/weather-location-api

Source
Go
Version
v0.0.0-20240701201202-46105248e28e
Version published
Created
Source

HNG Backend Track Intership

Stage one project

Task Description

Set up a basic web server in your preferred stack, Deploy it to any free hosting plaform and expose an API endpoint that conforms to the criteria below: Endpoint: [GET] <example.com>/api/hello?visitor_name=Mark (where <example.com> is your server origin) Response:

{
  "client_ip": "127.0.0.1", //The IP address of the requester
  "location": "New York" // The city of the requester
  "greeting": "Hello, Mark!, // the temperature is 11 degrees Celcius in New York"
}

Getting Started

Run the code:

go run main.go

API

https://weather-location-api.vercel.app/api/hello?visitor_name=Mark you can change the value of the visitor_name query parameter

FAQs

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