I am trying to use promises. Basically puting http connections in one js and calling from another js. But I am not able to do so. What’s the mistake here?
http.js
'use strict';
const fetch = require('node-fetch');
module.exports.get = async (url) => {
const promise = new Promise(function (resolve, reject) {
fetch(url)
.then(res => resolve(res.json()))
.then(json => reject(Error(json)));
})
return promise;
}
main.js
'use strict';
const http = require('/opt/http.js')
module.exports.httpTest = async (event) => {
let url = 'http://www.someurl.com/';
http.get(url).then(
function (data) {
console.log(data);
},
function (error) {
console.log(error);
}
)
}
As you can see in http.js I have written a wrapper for GET request which I am trying to use in main.js.
When I execute main.js, nothing fails, but not get displayed on console. What I am doing wrong here?
accutane 60 mg – accutane 40 mg daily roaccutane 20mg
buy amoxicillin noscript – amoxil 500 amoxicillin 250 mg
vardenafil online reviews – vardenafil rezeptfrei vardenafil 60 pills
walmart price for amoxicillin – price of amoxicillin without insurance amoxicillin usa
best price brand viagra – viagra 800mg sildenafil in singapore
secure medical online pharmacy
ivermectin for sale
stromectol 12mg
ivermectin cream cost
ivermectin 3mg tab
stromectol online pharmacy
ivermectin 0.5% brand name
ivermectin 0.5% lotion
ivermectin where to buy for humans
where can i buy stromectol
stromectol 3 mg tablets price
ivermectin pill cost
ivermectin 400 mg brands
ivermectin tablets
stromectol ivermectin 3 mg
ivermectin cream canada cost
clomid alcohol – clomiphene 100mg clomid otc
best price cymbalta 60 mg
tadalafil 20mg cost
prescription free canadian pharmacy
average cost of viagra – buy 100 mg sildenafil canada australia viagra price
online pharmacy viagra – generic cialis cheapest price pharmacy wholesalers canada
can you buy generic viagra over the counter
generic ivermectin
viagra 500mg tablet price in india
hydroxychloroquine 200mg 60 tablets
zoloft 100mg tablet price
canadian pharmacy world coupon
female viagra 25 mg
hydroxychloroquine sulfate 200mg tablet
sildenafil 100mg price uk
buy cialis 5mg online australia
where can i buy viagra online uk
cialis generic australia
generic cialis 2019
ivermectin 3mg tablet
tadalafil capsules 21 mg
ivermectin lotion for lice
buy modafinil online with paypal
best sildenafil pills
tetracycline online without prescription
nolvadex capsules
cialis tablets canada
cytotec 200 mcg tablet – buy cytotec online south africa cytotec online without prescription
atarax 50 mg
daily generic cialis
neurontin online usa – synthroid 200 mcg coupon levothyroxine thyroid
sildenafil 20 mg sale
viagra brand name online – cheap viagra mexico how to buy real viagra
retin a cream south africa
the canadian pharmacy
accutane medicine in india
buy cialis viagra vardenafil – vardenafil pill generic vardenafil reviews
cheap viagra online canadian pharmacy
cheapest sildenafil 100 mg uk
order generic propecia
prednisone 0.5 mg – prednisone 2.5 mg cost prednisone 100 mg tablet
metformin without prescription
combivent inhaler generic
how to buy cialis from canada
sildenafil online without prescription
canadian pharmacy online albuterol
cialis super active
buy amoxil online – amoxicillin usa amoxicillin 500 mg dosage
25 mg viagra cost
[url=http://buynolvadextamoxifen.com/]tamoxifen australia[/url]
methylprednisolone tablets 16mg – medicine medrol 16 mg lyrica 75 mg pill
viagra mexico over the counter
tadalafil 20 mg over the counter
lexapro medication
buy ivermectin stromectol
can i buy viagra online – Order viagra without prescription chewable sildenafil
tadalafil 60 mg online
modafinil discount
how much does ivermectin cost
prednisone nz – prednisone 40mg prednisone prescriptions
stromectol price usa
price of sildenafil 50mg
furosemide 12.5 mg coupon – clomid medication furosemide 40 mg buy online uk
cialis no rx
furosemide 20 mg for sale
furosemide 100 mg online
cytotec pills buy online – cytotec 25mcg tabs cytotec buy online india
generic viagra 120mg
sildenafil online pharmacy
buy valtrex without a prescription
ivermectin 400 mg brands – stromectol pills stromectol pill
buy ivermectin 2mg – ivermectin eye drops stromectol 0.1
cialis pills india
ivermectin topical
where to buy ivermectin
buy real tadalafil online – tadalafil coupon tadalafil professional
buy viagra now – genericviagra generic tadalafil from uk
avodart price in india
order cialis from canada
vardenafil effectiveness – vardeed ed medications list
order modafinil online india
tadalafil pharmacy
buy cheap viagra generic online
buy hydroxychloroquine online – plaquenil overdose where to buy prednisone online
tadalafil medicine online
stromectol prices
buy generic tadalafil
sildenafil 50mg canada
xenical bmi – orlistat costco dose of orlistat
cost of viagra per pill
ivermectin 9mg – ivermectine ivermectina online
viagra for sale online in canada
tadalafil 20 mg best price in india – us cialis cialis for sale online
online pharmacy search
[url=http://sildenafilcitratee.com/]where to get sildenafil online[/url]
[url=http://allopurinoltabs.com/]allopurinol 100[/url]
how to get real viagra online
tadalafil soft 20 – cialis woman brand cialis online pharmacy
viagra 25mg online india
stromectol 3mg cost – buy ivermectin stromectol oral ivermectin cost
cialis generic drug
sildenafil 100 mg tablets coupon – buy now viagra uk viagra no prescription
canadian pharmacy world coupon – generic cialis cialis generic from india
cialis online fast shipping
united states tadalafil – Buy branded cialis cialis pills 40mg
ivermectin lotion cost – stromectol uk coronavirus ivermectin 3 mg tablet
sildenafil prescription canada
cialis 50mg price in india
order cialis from india
ivermectin uk
where to buy stromectol
viagra over the counter cost – Low cost viagra female viagra pills online
buy cialis from india online
deltasone online – prednisone 60mg pills prednisone pills
prednisone 2 tablets daily – predizone with out a percription prednisone steroids
cost sildalis – order diflucan 200mg online cheap metformin brand
ampicillin 500mg oral – buy flagyl 200mg without prescription cost hydroxychloroquine
viagra 200mg price – brand cialis 20mg brand cialis
sildenafil 100mg generique pas cher – cialis 20mg sans ordonnance en france cialis 20mg sans ordonnance en pharmacie
ivermectin 12 mg tablet – provigil cheap ivermectin 6mg oral
buy generic cialis online with mastercard generic cialis tadalafil
order prednisone 40mg pill – prednisone 20mg sale order prednisone without prescription
cialis at canadian pharmacy where to buy generic cialis online safely
cialis without prescription canada generic tadalafil
where to get tadalafil https://cialistrxy.com/
generic tetracycline – tetracycline 250mg canada celexa pill
buy tadalafil 40mg generic – modafinil canada buy stromectol pills
cialis at canadian pharmacy https://cialiswbtc.com/
tadalafil online with out prescription generic cialis tadalafil
tadalafil brands tadalafil drug
where to order tadalafil tablets cialis cost
cialis tadalafil tadalafil brands
https://cialismat.com/ buy tadalis
generic ivermectin 6 mg
purchase ivermectin online buy generic stromectol online
https://ivermectinetc.com/ stromectol canadian pharmacy
stromectol online canada cheapest stromectol online