Skip to content

Latest commit

 

History

History

static

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Simple Static HTTP Server

This example shows a web server serving static content, which can be implemented using:

  • The http package in the standard Go library.
  • The third-party gin-gonic/gin package.

Setup

To run the static web server implemented using the http package:

  1. Run the server.

    $ make run-http
  2. Launch a web browser and navigate to http://localhost:8000.

To run the static web server implemented using the gin-gonic/gin package:

  1. Run the server

    $ make run-gin
  2. Launch a web browser and navigate to http://localhost:8000.