This API is still a work in progress.
The API is written in Go, using the gin-gonic RESTful API framework.
The goal of this repo is to become a cloud function that will return a static image with the details you requested from the API
The API has 3 endpoints:
/
/health
/generate
GET
endpoint that returns a Hello World
GET
endpoint for health checks. The endpoint just returns a simple 200 OK
response
POST
endpoint that returns a PNG image with the body parameters:
{
"title": "Elian Codes",
"pageTitle": "How I automate SEO to fit my needs",
"link": "www.elian.codes/blog"
}
title
: will be used as main title of the imagepageTitle
: serves as the title of the post or articlelink
: yet to build
- install Go 1.17
- install Go dependencies with
go install
- Install gowatch:
go get github.com/silenceper/gowatch
- run gowatch:
gowatch
running this command in your terminal should be enough to make it run locally
go run main.go
this will output a .exe (depending on your system)