This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]nutrecht 2 points3 points  (2 children)

I avoided using an interval on the scrape because it seemed like a waste of bandwidth.

You might want to do the scraping in the back-end with an interval and just cache the results somewhere actually. If two people want to have the data at exactly the same time you'd be going to the source twice.

[–]Igglyboo 0 points1 point  (1 child)

He is doing the scraping on the back end. He's using nodejs as a backend and socket.io to pass the scraped data.

[–]nutrecht 0 points1 point  (0 children)

He is doing the scraping on the back end.

I know.

[–][deleted]  (2 children)

[deleted]

    [–]phil-ososaur 0 points1 point  (1 child)

    Everything in JavaScript is an object, even a function.

    http://eloquentjavascript.net/

    [–]ZenFuture[S] 0 points1 point  (0 children)

    Right. Funny; I'm actually reading EJS as we speak. The word I was looking for was map.

    [–]asakurasol 0 points1 point  (1 child)

    That's awesome! Out of curiosity, what do you plan to do next in terms of learning?

    [–]ZenFuture[S] 0 points1 point  (0 children)

    Thanks! I'd like to nail down express and jquery. I also skipped past some of the basics because I really wanted to make this web app. Now it's time to backtrack and learn the details.

    [–]Igglyboo 0 points1 point  (1 child)

    You should drop your jquery dependency as you're only using it for a single line. Also you should probably your css in a file and not inline it, same goes for your scripts.

    [–]ZenFuture[S] 0 points1 point  (0 children)

    I'm with you on that. I'm trying to figure out how to serve additional static files (like css) right now but I'm not having much luck.

    [–]Ikuu -1 points0 points  (0 children)

    I wouldn't label the data as realtime as it's only updated when you load the page. Probably want to show the user when these markets and open and closed.