Skip to content

Charlesworth/websiteServer

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

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

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages