The issue here is that node-localstorage is entirely backend, and htlm5 localStorage is entirely client side. You will not be able to pull backend values set with node-localstorage on the client end.
In order to pass values from node to the client you will need a template engine. Express provides a pretty complete list of those engines here:
There are two files: 1)app.js and 2) browser.html. app.js just stores a value in a node-js local storage and browser.html should alerts that. But browser.html alerts “null”.
var LocalStorage = require('node-localstorage').LocalStorage;
localStorage = new LocalStorage('./scratch');
My html code:
<input value="Smart contract data" max="25" id="12"></input>
<script src='js/app.js'> </script>
What is the problem and its solution? Is there any way to communicate between node-js storage and a html file? Please guide a beginner man.
Do u want to run a node js server and the user should see the html page when he visits the site?
Thanks. Is it any different to choose one of these engines?