title: Passing arguments with curl with json header / passing arguments separated with ? in NODE.JS
body: <p>I want to like pass the arguments in insert into in a curl with "?" between them.
  this code like works like this localhost:8000/api/addBrand
  localhost:8000/api/deleteBrand/3 for example
  but like what i want is this for example localhost:8000/api/addBrand?something?something?something?something?
  is this possible ? or is there other methods to pass arguments in http or in curl cause mostly i'll work with curl . Thank you</p>
  
  <pre><code>    const express = require('express');
      const mariadb = require('mariadb/callback');
  
      const db = mariadb.createConnection({
       host: 'localhost',
       user: 'root',
       password: 'root',
       database: 'nodemysql'
      });
  
       db.connect((err) =&gt; {
       if(err){
              throw err;
          }
       else{
          console.log('MariaDB Connected...');
       }
       });
  
       const app = express();
       // Create DB
      app.get('/api/createdb', (req, res) =&gt; {
          let sql = 'CREATE DATABASE nodemysql';
          db.query(sql, (err, result) =&gt; {
              if(err) throw err;
              console.log(result);
              res.send('Database created...');
          });
      });
  
      // Create table
      app.get('/api/createBrand', (req, res) =&gt; {
          let sql = 'CREATE TABLE Brand(id int AUTO_INCREMENT, title VARCHAR(50), description VARCHAR(255), country VARCHAR(50), websiteurl VARCHAR(100), livestream VARCHAR(150), PRIMARY KEY(id))';
          db.query(sql, (err, result) =&gt; {
              if(err) throw err;
              console.log(result);
              res.send('Brand table created...');
          });
      });
  
      // Insert brand
      app.get('/api/addBrand', (req, res) =&gt; {
  
          let sql = 'INSERT into Brand(title, description, country, websiteurl, livestream)  values("something", "something", "something", "something.ma", "something.ma/something")';
          let query = db.query(sql, (err, result) =&gt; {
              if(err) throw err;
              console.log(result);
              res.send('Brand added...');
          });
      });
  
  // Delete Brand
  app.get('/api/deleteBrand/:id', (req, res) =&gt; {
      let sql = `DELETE FROM Brand WHERE id = ${req.params.id}`;
      let query = db.query(sql, (err, result) =&gt; {
          if(err) throw err;
          console.log(result);
          res.send('Brand deleted...');
      });
  });
  app.listen('8000', () =&gt; {
      console.log('Server started on port 8000');
  });
  </code></pre>