Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 590 Bytes

File metadata and controls

28 lines (20 loc) · 590 Bytes

This was originally started from this challenge: "Build Your Own HTTP server" Challenge.

HTTP server

cd app
go run .

HTTPS Support

I took the initial challenge and extended it to also allow the serving of HTTPS requests:

Generate certificates:

openssl req -x509 -newkey rsa:2048 \
  -keyout key.pem -out cert.pem \
  -days 365 -nodes -subj "/CN=localhost"

Launch the server with HTTPS support (use full path to cert and key files):

cd app
go run . -cert ../cert.pem -key ../key.pem -type https