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() }