Giter Club home page Giter Club logo

sneaks-app's Introduction

Sneaks App

The Sneaks App is a React website that allows users to search sneakers, get product information and compare prices from StockX, Flight Club, Goat and Stadium Goods through the Sneaks API

Demo

sneaks-app's People

Contributors

druv5319 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sneaks-app's Issues

License

What license is this code under?

Error: Could not connect to StockX while searching

server.js:

app.get('/api/product', (req, res) => {
    const { sneakerName } = req.query;
    console.log(req.query)
    // Retrieve product details using "sneaks-api" package
    sneaks.getProducts({sneakerName}, 10, function(err, products){
        console.log(products)
    })
});

react component:

const handleSearch = () => {
        // Fetch the product information from the backend
        axios.get(`http://localhost:8000/api/product?sneakerName=${sneakerName}`)
            .then((response) => {
                // Store the product information in the component's state
                setProduct(response.data);
            })
            .catch((error) => {
                console.log('Error:', error);
            });
    };

console.log in server:

Error: Could not connect to StockX while searching '
    at Object.getProductsAndInfo (/Users/tyler/Desktop/code/codingDojo/PA/sneakerverse/server/node_modules/sneaks-api/scrapers/stockx-scraper.js:62:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
null

Seems it is hanging on StockX and not searching the other website. It woks fine in my backend as per npm website instructions but I want to implement front end functionality

How to get rid of errors from my console log?

When I use the sneaks.getProducts() to fetch data, it works but i also get flooded with this error on my console log which makes it difficult for me to look at other stuff on the log. Do you know how I can hush these errors? The errors look like this

HTTPError: Response code 530 (undefined)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 'ERR_NON_2XX_3XX_RESPONSE',
timings: {
start: 1660663934323,

Is the API Down?

Ran the app on local instance, it failed to get the data as the API server is down. Can you please publish the API repo!

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.