Created
October 6, 2019 22:57
-
-
Save druv5319/acdc5adf90765fcfd19af6a0aa983969 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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