How to create a like button with node js express app?
<p>Im building a web page with node,express and mongodb.
Im trying to make a like button, but the problem is I cant pass a variable value from my ejs to my server side. how can I do that? here's what I've tried
Exemple</p>

<pre><code>Html
 &lt;div class="thumbnail"&gt;
           &lt;div class="caption"&gt;
                  &lt;strong  id="Title"&gt;&lt;%=video.title %&gt; &lt;/strong&gt;
               &lt;button id="like" value="Like" type="submit"&gt; 
              &lt;script&gt;
                     var videoId =&lt;%= video._id %&gt;;
                 $('#like').click(function(){
                 $.post('/like/'+videoId);
               });
            &lt;/script&gt;      
</code></pre>

<p>Server side</p>

<pre><code>    router.post('/like/:videoId', function (req, res) {
    var test = req.params.videoId;
    console.log("works");
    console.log(test);

     });
</code></pre>

<p>thanks in advance</p>