Git Product home page Git Product logo

newegg-price-tracker's Introduction

PriceTracker

NodeJS based web service to track the price changes on newegg.com

System requirements

Features

  • NodeJS based web service to track the price changes on newegg.com
  • See a tracked product’s price history by inputting a URL
  • (Optional) Sign up for price alerts
  • (Optional) Compare price histories
  • (Optional) See price history by category

Installing PriceTracker

Install Stuff

  • Node.JS
  • MongoDB
  • Add the MongoDB directory to your PATH environment variable. MongoDB does not do this for you.
  • Clone our project and use npm to install dependencies.
git clone https://github.com/cs580ice/PriceTracker.git <project_home>
cd <project_home>
npm install

Prepping MongoDB

cd <project_home>
mongo prep_mongodb.js

Import Test Data into MongoDB

cd <project_home>
mongoimport --db pricetrack --collection history --file samplehistory.json

Starting the Server

cd <project_home>
mongod --dbpath=<path_to_database_files>
npm start

Now you can access the web service via http://localhost:3000

Demo

Try searching for these products for a demo:

  • https://www.newegg.com/Product/Product.aspx?Item=N82E16811235048.
  • https://www.newegg.com/Product/Product.aspx?Item=N82E16834315672.
  • https://www.newegg.com/Product/Product.aspx?Item=9SIA2F83PB2659.
  • https://www.newegg.com/Product/Product.aspx?Item=N82E16820231826.

Development HOWTOs

Add new service(url mapping)

In web/server.js

app.get('/demo/:user', function(request, response) {
	response.send(request.params.user);
});

Try the new service http://localhost:3000/demo/InputAnythingYouWant

Different content format of a service

  • For plain text: javascript response.send( 'hello world' );
  • For JSON: javascript response.json( {message: 'hello world'} );
  • For HTML: javascript response.render( '<template_name>', model );

Note: locate templates in web/views/

newegg-price-tracker's People

Contributors

titanzhang avatar johnathanlouie avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.