Skip to content

Instantly share code, notes, and snippets.

@druv5319
Created October 6, 2019 22:57
Show Gist options
  • Save druv5319/acdc5adf90765fcfd19af6a0aa983969 to your computer and use it in GitHub Desktop.
Save druv5319/acdc5adf90765fcfd19af6a0aa983969 to your computer and use it in GitHub Desktop.
const express = require('express');
const request = require('request');
const cheerio = require('cheerio');
const axios = require('axios')
const app = express();
app.get('/', function(req, res){
let shoe =req.query.shoe;
let url = 'https://stockx.com/api/products/nike-daybreak-undercover-black?includes=market'
request(url, function(error, response, html) {
if (!error) {
var $ = cheerio.load(html);
console.log(html)
res.send();
}
});
});
app.listen('8080');
console.log('API is running on http://localhost:8080');
module.exports = app;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment