Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudflare worker support? #216

Open
vickyRathee opened this issue Sep 8, 2024 · 3 comments
Open

Cloudflare worker support? #216

vickyRathee opened this issue Sep 8, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@vickyRathee
Copy link

Anyway to run this code on Cloudflare worker?

@kozakdenys kozakdenys added the documentation Improvements or additions to documentation label Oct 19, 2024
@mariusbolik
Copy link

mariusbolik commented Oct 22, 2024

I'm also interested to use this package in a server side environment.
Currently I am getting thei following message: window is not defined
Maybe it's possible to use this package without the window object :)

@kozakdenys
Copy link
Owner

kozakdenys commented Oct 22, 2024

Hi @mariusbolik, please try to use the latest version of package, it should work. You can find example of using with node.js here https://github.com/kozakdenys/qr-code-styling-examples/blob/master/examples/nodejs/src/main.ts

@mariusbolik
Copy link

Thank you for the example @kozakdenys! Sadly it still can't be used on Cloudflare Workers, because JSDom is not supported. A valid solution could be to use Cheerio or Puppeteer to create a QR Code in a Workers environment. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants