Ask coding questions

← Back to all posts
Having a hard time extracting value to the sever
nanasv (0)

Few things confused me about extracting value from either html
links or html
form path and
module to the server,
For example:
1.suppose I create html like...

  
  <article id="my-article">
  
<p>do some stuff </p>
  
  </article>
And at some point in the website I create a link ...
  <a href="#my-article">go here for more article </a>

 how do I extract the content of article ( value),the on the sever for manipulation. 

  MY DOUBT 
below is how am trying to extract the content but am not getting it right.

server.js
let express = require("express");
let app = express();
  app.get("/article/my-article",function(req,res){
    let article = req.params.my-article
  });

hope you understand the question thanks.