Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

websiteServer

It serves websites.....

  • with autogenerated SSL certificates from Let’s Encrypt
  • with HTTP2 server push for less round trips
  • with automatic http to https redirects
  • easy static file to path mappings

For an example of a website running on websiteServer visit ccochrane.com and the associated SSL report can be found here.

Use a mapping.json file to descibe which files to serve at which paths:

{
    "file-paths":[
        {
            "file":"pic.jpg",
            "path":"/pic.jpg"
        },
        {
            "file":"robot.txt",
            "path":"/robot.txt"
        },
    ],
    "push-file-paths":[
        {
            "file":"index.html",
            "path":"/",
            "push-paths":[
                "/pic.jpg"
            ]
        }
    ]
}

Then run websiteServer:

$ ./websiteServer -domain=example.com

Please make sure port 80 and 443 are accessible and DNS for your domain is set up. A full list of flags can be found via:

$ ./websiteServer -h

Building with Docker

An example Dockerfile can be found here.

Local development

Please have go and go dep installed.

To install dependancies

$ dep ensure

To build:

$ go build

Please log any bugs or suggestion as Github issues. Pull requests always welcome.

Special thanks to Let's Encrypt, please consider donating to them.

About

HTTPS website server with cert autogeneration and server push

Resources

License

Releases

No releases published

Packages

No packages published

Languages