How to make an Enumerator not from a file?

I am developing a web application using scala + play 2.0.4. When the program starts, it pulls a huge amount of data from mongoDB and tries to make a csv file and send it to the client browser to download the csv file. But the data was so large that the browser couldn't wait long without some kind of response. I tried to use Ok.stream () and Enumerator, but I don't know how to use it and deal with this problem. Could you please tell me how to fix this problem using Ok.stream and Enumerator?

+3


source to share





All Articles