Skip to content
/ web Public

Simple HTTPS web server with HTTP redirection and without running as root

License

Notifications You must be signed in to change notification settings

jdcio/web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

web

Simple HTTPS web server with HTTP redirection and without running as root

package main

import (
  "github.com/jdcio/web"
  "net/http"
)

func main() {
  web.Load("./keys/server.*", // ssl certs blob
    "web", // After server boots as root to open ports 80 and 443 it will drop down to user 'web'
  )
  
  web.Serve(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    w.Write([]byte("Hello World!"))
  })
}

About

Simple HTTPS web server with HTTP redirection and without running as root

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages