Create a file and store it in memory

How can i create a file in node.js and store it inside memory so that it can be read after the server has been reopened?