stock-market-india
stock-market-india copied to clipboard
Not working in production serevers like vercel , digital oceans and aws cloud
i see you are passing custom headers to request from local but this settings are not working for production servers
var options = {
headers: {
'X-Requested-With': 'XMLHttpRequest',
'Referer': 'https://www.nseindia.com/ChartApp/install/charts/mainpage.jsp',
Host: 'www.nseindia.com'
},
transformResponse: searchTransformer(false)
};
i applied .catch section for this to know what went wrong but request is not rejecting and catching the error
NSEAPI.searchStocks(req.query.keyword)
.then(function (response) {
console.log("search response",response.data)
res.json(response.data);
}).catch((errr)=>{
console.log(errr)
});
Hi @rizwan92 , have you got any work around to deploy this project on production servers like heroku, vercel and aws cloud
I stuck at some point . We might have take to take different approach. I could complete it all i need is time
If you have AWS you need to have it configured in India. NSE is not accessible outside india. May be a dedicated Indian Proxy can help which is cheap as compared to have a dedicated instance.
Hi @rizwan92 , did u get any work around for this?
Yeahh all you have to do is run servers inside india.
You cannot access stock market from outside of india
Any request coming out side of Indian IPS blocked
Thanks @trezapeter89 @rizwan92 was really stuck in this one as I deployed them as netlify functions and kept getting Task timed out after 10.01 seconds
.