A simple web server written in Go. Intended as a basic starting point for building a fast & secure web host.
- Demonstrates the basic use of Go's http package including TLS.
- Automatically redirects to https to secure web traffic.
- Uses http FileServer handler to serve files.
- Simple server configuration via json file.
On Linux/Unix systems the simplest way to obtain your SSL certificate & key file is by using Certbot https://certbot.eff.org/. You'll need the fullchain.pem and the privkey.pem files.
$ go buildRename config.json.example file to config.json and edit the configuration to suit your needs.
$ basicserv -config "path/to/config.json"Visit your web address in a web browser to test the server and verify your site is using a secure connection.
Once you have successfully tested the server you are ready to edit the code and build a website to suit your needs. Good luck and have fun!