Giter Club home page Giter Club logo

penny-auction-server's Introduction

Penny Auction Server

This server provides infrastructure to simulate a penny auction, like the site http://www.quibids.com/. This server will return information about 10 items always up for auction. The server allows clients to send PUT requests with a username to allow someone to "bid" on an item. The server is also configured to simulate "random betters" to make the auctions appear active. The server provides a "remote control" API where auctions can be reset (in case everything stabilizes to SOLD) and the random betters functionality can be enabled and disabled gracefully.

The penny-auction-server repo has a sister repo for the penny auction client:

https://github.com/WDI-SEA/penny-auction-client-solution

Enjoy!

API

Auction Information

Here's how you can use fetch() to initiate a PUT request to the server:

var json = JSON.stringify({username: 'penguincool42'});
fetch(`http://pennyauctionserver.herokuapp.com/auctions/${this.props.item.id}`,
  {
    method: 'PUT',
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json'
    },
    body: json
})
.then((response) => {
  return response.json();
}).then((response) => {
  console.log("put response", response);
}).catch((response) => {
  console.log('Error!', response);
});

Auction Remote Controls

Random Betters

The server includes a mechanism to simulate activity on all of the auctions.

What are Penny Auctions?

Penny auctions are websites where expensive items, like $1,000 TVs or iPads or even small $10 Wal Mart Gift Cards are put up for auction. Each auction only exists for "a small amount of time." Each auction starts at a small price and has a minute on the clock. When users bid on an item the auction price of the item increases by one cent and ten seconds is added to the clock.

These sites are a total scam. People see expensive items at low auction prices with short clock times and think they can easily snag a cheap item. The sites rely on having enough users on the page making enough active bids that each auction actually lasts for a very long time. Even when the clock hovers around "zero seconds left" it will stay there for quite a long time because each user bid will add ten seconds to the clock, basically forever.

Anyways, these sites present a fun and interesting development challenge.

Licensing

All content is licensed under a CC­BY­NC­SA 4.0 license. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].

penny-auction-server's People

Contributors

geluso avatar

Watchers

James Cloos avatar eugene tang 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.