How to access localStorage in node.js?

Chris Abrams picture Chris Abrams · Apr 27, 2012 · Viewed 77.2k times · Source

I tried searching the web for a node module that can access the client's localStorage but wasn't able to find anything. Anyone know of one?

Answer

VijeshJain picture VijeshJain · Oct 15, 2014

You can use :

node-localstorage npm module to use localStorage at the server side.

var LocalStorage = require('node-localstorage').LocalStorage,
localStorage = new LocalStorage('./scratch');