majodev / google-webfonts-helper

A Hassle-Free Way to Self-Host Google Fonts. Get eot, ttf, svg, woff and woff2 files + CSS snippets
https://gwfh.mranftl.com
MIT License
12.24k stars 431 forks source link

Service down - usage with @beyonk/google-fonts-webpack-plugin #131

Closed FreaKzero closed 2 years ago

FreaKzero commented 3 years ago

Service is currently unavailable which is pretty bad for webpack builds which use google-fonts-webpack-plugin since the builds will fail silently.

filipac commented 3 years ago

yeah, i have the same error. webpack fails to build and breaks build

zubairhixol commented 3 years ago

Service down from last three to four hours...

filipac commented 3 years ago

Heroku had some incidents, maybe this is related to that?

jacobg commented 3 years ago

Linked issues: https://github.com/majodev/google-webfonts-helper/issues/81 https://github.com/gabiseabra/google-fonts-webpack-plugin/issues/34 https://github.com/beyonk-adventures/google-fonts-webpack-plugin/issues/19

mutdmour commented 3 years ago

Created temporary service here to unblock builds https://n8n-google-fonts-helper.herokuapp.com/api/fonts

Can be used like this:

            new GoogleFontsPlugin({
                apiUrl: 'https://n8n-google-fonts-helper.herokuapp.com/api/fonts',
                                ...
            }),
jacobg commented 3 years ago

I switched to using fontsource instead instead (https://fontsource.org/).

It's easy to set up, and avoids remote dependencies other than npm when installing. All that's necessary is: 1) package.json dev dependency - "@fontsource/open-sans": "^4.5.0" 2) main.js import "@fontsource/open-sans/latin-400.css" 3) css -

body {
    font-family: 'Open Sans', sans-serif;
}
weinde commented 3 years ago

this is still going on... any idea when this will be resolved?

Dan0sz commented 3 years ago

Created temporary service here to unblock builds https://n8n-google-fonts-helper.herokuapp.com/api/fonts

Can be used like this:

          new GoogleFontsPlugin({
              apiUrl: 'https://n8n-google-fonts-helper.herokuapp.com/api/fonts',
                                ...
          }),

Noob question here, @mutdmour would you like to provide instructions on how I can setup my own mirror of this, too? This has been happening a lot lately, and I'd like to provide a permanent mirror if possible.

mutdmour commented 3 years ago

@Dan0sz great idea as I don't plan to support this temporary service forever.. At least until this original service goes back up or https://github.com/n8n-io/n8n migrates over to fontsource.. (I don't have a timeline for this yet, but I will give heads up in this thread and give some time before deprecating, maybe even do a scream test)

I created a fork here and fixed build issues until it was working on heroku with the latest node version https://github.com/mutdmour/google-webfonts-helper

To deploy this service with Heroku:

  1. Fork my fork

  2. login/signup with heroku

  3. Create new app.. Give it whatever name, and pick your region

  4. Once created, under Deploy tab, click on Github as Deployment method

  5. Connect to your github account if not already connected

  6. Search for your repo and click connect

    Screen Shot 2021-09-20 at 11 50 52 AM
  7. Under manual deploy, click on deploy branch

    Screen Shot 2021-09-20 at 11 45 27 AM
  8. Once deployed, go to https://{{YOUR_APP_NAME}}.herokuapp.com/api/fonts and check you get valid response

  9. To minimize interruptions, I would recommend upgrading to a paid dyno

c33s commented 3 years ago

are there docs about how to setup this on a basic linux machine (no heroku)?

mutdmour commented 3 years ago

@c33s it's a simple express service.. you can run it with npm run start.. I would google any express on linux guide (this was first result on google)

sephentos commented 3 years ago

Glad it came back online... and sad about the lack of updates in this repo :(

mutdmour commented 3 years ago

With n8n switching to fontsource and the original service back up, I am going to end support for the mirror service (https://n8n-google-fonts-helper.herokuapp.com/api/fonts)..

If you are using this, you have until October 4th to make the switch...

ayuhito commented 3 years ago

Created temporary service here to unblock builds https://n8n-google-fonts-helper.herokuapp.com/api/fonts

I’ve been working on replacing this repo entirely with Fontsource. That includes serving an API for external applications (with more plans on improving this service).

Do check this out for future projects if you need something similar: https://fontsource.org/docs/api/introduction

It should be more production-friendly too since we’ve got sponsored dedicated servers.

Feel free to create issues and suggestions for the project too, as I ideally want to completely replace google-webfonts-helper in the future.

Dan0sz commented 3 years ago

If you are using this, you have until October 4th to make the switch...

I setup my own. Thanks a lot for the help!

I'll also look into migrating to FontSource. The only thing is that I have some users that require access to TTF, EOT files, etc. I guess I should just give them a heads up, that they should update their platforms :)

mutdmour commented 3 years ago

With n8n switching to fontsource and the original service back up, I am going to end support for the mirror service (https://n8n-google-fonts-helper.herokuapp.com/api/fonts)..

If you are using this, you have until October 4th to make the switch...

Service is still getting requests. I just turned switched instance to free Heroku mode, so it will no longer be reliable. You can switch back to original service or FontSource alternative one.

majodev commented 2 years ago

dup https://github.com/majodev/google-webfonts-helper/issues/151#issuecomment-1240398538