github-readme-quotes
github-readme-quotes copied to clipboard
Hosted Heroku link not working
Hosted Heroku link not working
Screenshots
Desktop:
- OS: [Windows]
- Browser [chrome]
have you uploaded database to server
getting the same error today...
heroku logs --tail --app your_app_name run this command in git and check do you get any errors in deploy if yes then deploy it again with a correct manner
hey abhi, I'm using the api for this repository in one of my readme.md's. how would I go about doing what you just told me in my case? Thanks in advance.
that does not matter in you git cd to the root folder of your project and run the command to check logs of Heroku. if you find out error in logs. if you use any string in API which store in .env file then you need to add environment variables in heroku app also
the api used to work in my private repository README's before, but this week due to some reason it suddenly stopped working. I don't think I have heroku installed on my end so this is what I get when I try to run
heroku logs --tail --cam_sys-22
(my repo is named cam_sys-22).
This is what it looks like in my repos:
Inside Readme.md:
When clicking on it:
I used this to invoke the api:
<p align="center">
<img src="https://github-readme-quotes.herokuapp.com/quote?quotesUrl=https://github.com/teamr3/public-quotes/blob/master/auton_sys-22/quote-1.json">
</p>
Hope this helps, thanks!
go to youtube and watch a tutorial for this try deployment again from start
Since we are using a free quota, every month we have a downtime of 1/1.5 day for which it won't be available. I hope that clarifies system unavailability of the utility for some time every month
Got it! Thanks @shravan20, makes sense!
why not host it on some other provider then which is free? like netlify maybe @shravan20
Can anyone pick this up for deployment in any of the service of your own?
Why not shift the code to render.com?
Why not shift the code to render.com?
This has been moved to GCP now, you can continue using it.
That's the reason why your IP for the URL for the project. However, the site doesn't works on handheld devices.
Also, from the website to README file, the forwarding URL is mentioned of heroku. I think that needs a change.
@ashishk1331 : I am able to access the website in mobile devices. Do you want to pick this issue up to update the documents with images instead of those URL so as to save unwanted API additional calls? Or we can make it cacheable calls too, I think this is a better idea. Would you like to pick this up?
Yes sir. I would love to pick it up.
Also, I'm a bit confused about replacing API calls with images. So, Instead of displaying API endpoint you want to display pre-saved images for the same?
I can update the API url to match the current url in different documents.
@ashishk1331:
This part of the code is responsible for not caching the response in the github content and dynamically generating new quotes that is shown on the github readme. This part of the code explicitly set response header to expire the reponse within 0 seconds even if it has been cached, forcing it to invalidated.
You can introduce a field to skip this caching and completely skip the below header being set. This would ensure github cache not being invalidated.
res.header(
"Cache-Control",
"no-cache,max-age=0,no-store,s-maxage=0,proxy-revalidate"
);
res.header("Pragma", "no-cache");
res.header("Expires", "-1");
Please find this code in src/api/controllers/quotesController.js
I implemented public caching for 1 hour. The time limit can be changed by modifying the hours variable before the header.
However, I think until and unless there is a change made by the user, we can cache the response for a year. Because README remains still for years.
Let's keep it optional, only if you pass a value in query params, since we want to maintain the basic USP of the product to generate Dynamic Quote
Okay. So the query parameters namely cache and expire_after can do the trick,
cache = true | false
expire_after = 1 (hours)
Would generate the cache header with max age of 1 hour. Something like this?
Folks we have moved it to vercel, closing this issue. Please do check the latest documentation changes.
Marking this as closed as it is fixed, by migrating the application to vercel