DenverCoder1/readme-typing-svg

Google Font Error

VikashPR opened this issue · 5 comments

Describe the bug
A clear and concise description of what the bug is.

I tried to deploy the app in my Heroku account. It works fine but when every I change new font I'am getting some error in the output.
To Reproduce
Steps to reproduce the behavior:

  1. Go to My deployed domain
  2. Change the font to QuickSand or any other font.
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

I wanted my deployment link to work like the original one

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2022-02-28 at 7 50 57 AM

Desktop (please complete the following information):

  • OS: Mac
  • Browser Safari
  • Version 12.2.1

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

To get Google fonts to work, you'll need the postgresql add-on in Heroku

Screenshot_20220227-203457~2

A table also needs to be created in the database called fonts with fields fetch_date and css

oh alright, TBH I have no prior experience with Heroku before and Postgres. I tried to enable dynos but I was not able get it working.
Is there any other way ?
or can you please help me out to get it working ?

Here is the definition for the table:

CREATE TABLE fonts (
	"family" varchar(50) NOT NULL,
	css varchar(1200000) NOT NULL,
	fetch_date date NOT NULL,
	CONSTRAINT fonts_pkey PRIMARY KEY (family)
);

You'll need to use the database credentials (found by clicking the Postgres add-on and going to Settings) to add this table to your database.

image

You can do it from a postgreSQL command line tool or connect through a GUI such as DBeaver or others. You can probably find a tutorial that can give you steps for that.

You can add the fields manually in a GUI or use a CLI or SQL editor in a GUI and run the snippet I posted above.

The latest version of the code no longer uses the postgresql database, so if you want to try it now, it shouldn't have this issue