neg4n/next-api-og-image

Live example

bmstefanski opened this issue ยท 5 comments

Hi, is there a live example I could visit to check how the library works?
Also, it would prove the fact that this library can be deployed on Vercel without exceeding their quota :D
Let me know what you think and if I can help with something ๐Ÿ˜„

Hey @neg4n appreciate you building this! I'm having trouble deploying this as well and have been unable to so far. Do you have any suggestions on how to make this run deployed?

It seems puppeteer can't be run on vercel functions as far as I've experimented. But works great locally!

@jfobrien29 hmm It should be possible, there's at least one repo (that is using this) deployed on Vercel
Preview: https://og.thcl.dev/api/general?templateTitle=Page%20Name&siteName=Your%20Site%20Name&description=Lorem%20ipsum&theme=light
Github: https://github.com/theodorusclarence/og/blob/main/src/pages/api/general.ts

But it has an older version, so maybe something is not working correctly ๐Ÿค” @neg4n

neg4n commented

๐Ÿ‘‹ Hey @bmstefanski @jfobrien29! There was a critical bug related to detecting NODE_ENV properly in 2.1.0 and it is fixed in 2.1.1. Its available on npm but I haven't pushed the changes to the repository and made the release on GitHub yet. Cheers

Appreciate the help! I downgraded to 2.0.0 and it works great. I've been trying to generate pngs using vercel serverless functions for the last 24hrs and this package is exactly what I needed.

I'll poke around and see how I can help contribute.

neg4n commented

Thats super cool @jfobrien29 ๐Ÿš€ In the next days (probably tomorrow) I will create some issues related to development of the library then you will be able to pick something if you decide to contribute ๐Ÿ˜‡

I will also make sure that everything is stable since https://github.com/neg4n/next-api-og-image/releases/tag/2.1.0

Answering the original question by @bmstefanski - Thats good idea to deploy example project so everyone can see the library is working. I will do that in my free time ๐Ÿ˜Ž