clintonwoo / hackernews-react-graphql

Hacker News clone rewritten with universal JavaScript, using React and GraphQL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non-HN Backend?

baziz opened this issue · comments

commented

Hi!

Thanks for your work here. Any advice on the best way I can construct my own backend to make a company-internal version of this for myself? Right now this clone seems really to clone the front end, but I'm not sure how to "swap out" the HN API that it is currently using. Any advice / guidance is very appreciated!

Thanks for the kind comment. You can find most of the functions for network requests in the src/data folder. If you swap out HNDataAPI.js or Database.js that should be enough to replace the network requests. Hacker News uses Firebase but maybe you could make your own server in Node.js/Express with any database.

commented

I observed this Clinton, thank you much. I actually had in mind doing the former (swapping HNDataAPI.js) but was looking for a rec like Node / Express + MySQL or the like. The code looks darn clean - good on you. Anyhow, I will get to work on that - thank you again!