Client side and Server side rendering of ejs template
<p>I always wanted to learn NodeJS to be able to run the same code on server and client side.
I am using NodeJS with Express and EJS. 
So. I have a .ejs page with lot's of HTML, JS, CSS and a small bit with template. For the sake of justice let it be like this:</p>

<p>the_list-->some.ejs</p>

<pre><code>&lt;ul&gt; 
&lt;% for(i=0;i&gt;the_list.length;i++) { %&gt;
    &lt;li&gt;the_list[i]&lt;/li&gt;
&lt;% } %&gt;
&lt;/ul&gt;    
</code></pre>

<p>After some rendering on the server we have a perfect list. </p>

<p>So.
Now I want to rerender it on the client. I made some ajax request and now I have new items in the_list. What is the right way? </p>