From ef8ddca251683187081186e49bf66241711bc590 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Fri, 11 Dec 2020 00:25:47 -0500 Subject: [PATCH] more info to readme and fixes --- README.md | 6 ++++++ cmd/main.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c7dff78..ecd15ae 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ This is an HTTP API which provides information on the x509 certificates deployed on TLS sites. You can self-host this yourself, however you're more than welcome to use the public API at https://certapi.libraryofcode.org/ +### Installation +Run `make` to build the binary. It'll be installed in `build/certificateapi`. Simply run this executable. +#### Environment Variables +By default, the application listens on port `8080`. You can change this by setting the `PORT` environment variable to what you want. +When running in production, set this environment variable: `GIN_MODE=release` + ### How to Query Send a GET request to `https://certapi.libraryofcode.org` with the query parameter `q` set to equal the site you wish to dial. Ex: `https://certapi.libraryofcode.org/?q=www.google.com` diff --git a/cmd/main.go b/cmd/main.go index 86508f8..c4120bf 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -10,5 +10,5 @@ func main() { router.GET("/", routes.GetCertificateInfo) - router.Run(":3030") + router.Run() }