JacksonBates / fcc-scraper

A web scraping tool to allow freeCodeCamp campers to download their solutions.
https://freecodecamp-solutions.herokuapp.com
29 stars 3 forks source link

Refactor #3

Closed IsaacAbrahamson closed 7 years ago

IsaacAbrahamson commented 7 years ago

Hello, Jackson, I really love your project! When I first looked at it, it was a little confusing and unorganized, so I tried to tidy things up.

My first change was moving all the basic scraping utility function to their own module, scraper.js. I think this is a good idea since it separates the scraping logic from index.js which performs the command line logic. This will also make it easy to implement an Express server if you do decide to do that later.

My second major change was refactoring index.js a bit to improve readability, especially using async functions to make code read synchronously!

Let me know what you think, I hope you like some of my ideas!

JacksonBates commented 7 years ago

Hey Isaac - Sorry I missed this while I was working on the front end.

I'm pushing some big changes to the repo that builds out a front end and does some refactoring as well.

Once that's done, feel free to tinker with it afterwards :)

IsaacAbrahamson commented 7 years ago

Sure, no problem, glad you got the web app working!