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.
To run the static web server implemented using the http
package:
-
Run the server.
$ make run-http
-
Launch a web browser and navigate to http://localhost:8000.
To run the static web server implemented using the gin-gonic/gin
package:
-
Run the server
$ make run-gin
-
Launch a web browser and navigate to http://localhost:8000.