An open API service indexing awesome lists of open source software.

https://github.com/munawwar/social-image-service

🎨 Dynamically generate social media images for web pages. Deploy to AWS Lambda
https://github.com/munawwar/social-image-service

social-images

Last synced: 6 months ago
JSON representation

🎨 Dynamically generate social media images for web pages. Deploy to AWS Lambda

Awesome Lists containing this project

README

          

# Social Image Service

Dynamically generate social media images for web pages, using AWS Lambda ([arc.codes](https://arc.codes)), Satori and resvg.

Preview

# Step 1: Design

```sh
# Use node.js v20.x
# I use fnm node.js version manager
# fnm install 20
npm ci
npm run preview
```

Start editing JSX and styles at `src/http/get-index/get-open-graph-jsx.js`

# Step 2: Test image generation locally

```sh
npm run dev
# Test end-point
open http://localhost:3333/?title=Queues%20with%20Gmail&tag=YOLO
```

# Step 3: Deploy to AWS

Set AWS credentials named `personal` in `~/.aws/credentials` file.

```
[personal]
aws_access_key_id=
aws_secret_access_key=
```

```sh
npm run deploy
# Once it completes, it will display the deployed service URL
```

Use the following tags in your head tag (after filling the placeholders):
```html

```