more info to readme and fixes

merge-requests/1/head
Matthew 2020-12-11 00:25:47 -05:00
parent 52f972c424
commit ef8ddca251
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
2 changed files with 7 additions and 1 deletions

View File

@ -4,6 +4,12 @@
This is an HTTP API which provides information on the x509 certificates deployed on TLS sites. 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/ 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 ### 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. 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` Ex: `https://certapi.libraryofcode.org/?q=www.google.com`

View File

@ -10,5 +10,5 @@ func main() {
router.GET("/", routes.GetCertificateInfo) router.GET("/", routes.GetCertificateInfo)
router.Run(":3030") router.Run()
} }