Skip to content

colebrumley/example-golang-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example HTTP REST API in Go

Small demo/boilerplate of golang's net/http package.

Flags

  -cert="": TLS cert file
  -key="": TLS key file
  -listen=":80": Address to listen on
  -password="": Enable basic authentication
  -tls=false: Use TLS (requires -cert and -key)

To run: go run example.go basicauth.go -h

To build: go build example.go basicauth.go

About

Super basic golang HTTP API demo with TLS and basic auth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages