Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eliancodes/eliancodes-image-generator
An image generator built to run as Google Cloud Function to generate static images for your websites SEO
https://github.com/eliancodes/eliancodes-image-generator
gcp go seo
Last synced: 9 days ago
JSON representation
An image generator built to run as Google Cloud Function to generate static images for your websites SEO
- Host: GitHub
- URL: https://github.com/eliancodes/eliancodes-image-generator
- Owner: ElianCodes
- Created: 2021-10-18T20:06:04.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-10T23:58:09.000Z (about 3 years ago)
- Last Synced: 2024-10-09T00:41:28.896Z (3 months ago)
- Topics: gcp, go, seo
- Language: Go
- Homepage:
- Size: 1.98 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ElianCodes-imageGenerator
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
## Usage
The API has 3 endpoints:
1. `/`
2. `/health`
3. `/generate`### `/`
`GET` endpoint that returns a Hello World
### `/health`
`GET` endpoint for health checks. The endpoint just returns a simple `200 OK` response
### `/generate`
`POST` endpoint that returns a PNG image with the body parameters:
#### body
```json
{
"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 image
- `pageTitle`: serves as the title of the post or article
- `link`: yet to build## Development
### Prerequisites
- install Go 1.17
- install Go dependencies with `go install`### Local
- 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
## Building
```bash
go run main.go
```this will output a .exe (depending on your system)