hackernews-react-graphql icon indicating copy to clipboard operation
hackernews-react-graphql copied to clipboard

question about building(what should I do next to get data)

Open zzz6519003 opened this issue 2 years ago • 4 comments

I run npm start then the project runs, what should I do next to get data from HN? I need to apply for API keys?

Thx!

zzz6519003 avatar Apr 08 '22 08:04 zzz6519003

I believe it should automatically be making requests to the HN API, but the project maintains it's own in memory cache of the news feed indeces, so you might need to wait for a delay defined in the server.ts file (based on whether it's NODE_ENV=production or development) before it prefetches that

clintonwoo avatar Apr 09 '22 15:04 clintonwoo

I change it to this:

// Seed the in-memory data using the HN api
// const delay = dev ? ONE_MINUTE : 0;
const delay =  0;

run the project

still see no data XD

zzz6519003 avatar Apr 10 '22 12:04 zzz6519003

If I wan't to develop with sample data

I just need to run npm start?

still see no data in the default page

zzz6519003 avatar Apr 10 '22 12:04 zzz6519003

I believe it should automatically be making requests to the HN API, but the project maintains it's own in memory cache of the news feed indeces, so you might need to wait for a delay defined in the server.ts file (based on whether it's NODE_ENV=production or development) before it prefetches that

HN don't have GraphQL API, so? XD

zzz6519003 avatar May 01 '22 13:05 zzz6519003