sample-https

command
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

SAMPLE HTTPS

A sample http app built using gofr.

RUN

To run the app follow the below steps:

  1. go run main.go

This will start the server at port 9007.

DOCKER BUILD

To Build a docker image, follow the below steps:

On non linux machines :

  1. GOOS=linux go build main.go This will build a go binary
  2. docker build -t sample-https:$(date +%s) .

On linux machines(Ubuntu/Mac):

  1. go build main.go This will build a go binary
  2. docker build -t sample-https:$(date +%s) .

GENERATE TLS CERTIFICATE

Run the below command, from the project root directory, to generate the tls certificates

cd configs; go run /usr/local/go/src/crypto/tls/generate_cert.go --rsa-bits 1024 --host 127.0.0.1,::1,localhost --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h; cd ..

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL