Serving in Production
When youâre actively developing your Node.js code, you want the turn-around time to be fast and its reliance on external systems to be low. So far weâve been keeping things this way, using the isDev variable to occasionally make choices about whether to do things the development way.
In this section, youâll take the remaining steps to prepare the application to run in production mode. Once everything is in place, weâll clean out the project and reinstall the dependency modules to perform a clean production test run.
The first thing we need to switch out is how session data is stored. In a production environment, youâre usually better off storing sessions on a service like Redis than on the filesystem.
Redis is ...
Get Node.js 8 the Right Way now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.