go-sample-app

command module
v0.0.0-...-9934139 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 13 Imported by: 0

README

Go Sample App

A simple Go application which contains the following features:

  1. Acts as an HTTP client
  2. Acts as an HTTP server
  3. Makes use of Redis for caching

What it does

  1. The application exposes a web server that receives a querystring q as its only argument.
  2. The string provided for q will be used to query Google.
  3. The results from the first page are then filtered and all titles of results are returned in a JSON format.
  4. The result is then cached in Redis for 15 seconds.
  5. If the same query is made within 15 seconds, the data is retrieved from Redis instead of querying Google again.

How to start the application

Start Redis
$ docker compose up -d
Start the application
$ go run .

Running the application

  1. Call the URL http://localhost:9090/query?q=myquery

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL