xaxa
xaxa

Reputation: 1159

How to make long-requests node.js application on heroku

I want to make an application on Heroku using node.js to display various statistics.

This means that requests can take a long time to complete (more than standard 30 secs). 1. How can I increase the timeout interval so that my app wouldn't crash on request timeout? 2. How can I make long-poll requests to gradually stream data to client as long as it's being processed on server?

Thank you.

Upvotes: 0

Views: 877

Answers (1)

Gal Ben-Haim
Gal Ben-Haim

Reputation: 17803

you can use http://socket.io for two-way server/client communication.

according to https://devcenter.heroku.com/articles/using-socket-io-with-node-js-on-heroku, Websockets is currently not supported on Heroku. but socket.io can handle various protocols which some are supported on Heroku.

Upvotes: 1

Related Questions