` `

 function test(lit,...sub){

    console.log(lit);
    console.log(sub);

}
const nom = "dupont"
const adj = "cool"

test `denis ${nom} est ${adj}`;

modules

 index.html

src

    index.js

    query.js


index.html

<!doctype html>
<html>
<head>
    <title>My project</title>
</head>
<body>
    <script src="./src/index.js" type="module"></script>
</body>
</html>

index.js

import retrieveContent from './query.js';

console.log("here they are");
async function showContent() {
  try {
    const content = await retrieveContent();
    let ul = document.createElement('ul');
    content.forEach(element => {
       let li = document.createElement('li');
       li.innerText = element;
       ul.appendChild(li);

    });
   
    

    document.getElementsByTagName('body')[0].appendChild(ul);
  } catch (e) {
    console.log('Error', e);
  }
}

showContent();

query.js


export default async function retrieveContent() {
    const url = "https://baconipsum.com/api/?type=all-meat&paras=2&start-with-lorem=1";
  
    const response = await fetch(url);
    return response.json();
  }
  


before/after

/* On ajoute un coeur avant les liens */
a::before {
  content: "♥";
}

 lien

Server nodejs

sous powershell 

> $env:PORT="8000"    

> echo $env:PORT      

8000

const http = require('http')

const port =  process.env.PORT;

const server = http.createServer((req, res) => {
  res.statusCode = 200
  res.setHeader('Content-Type', 'text/html')
  res.end('<h1>Hello, World!</h1>')
})

server.listen(port, () => {
  console.log(`Server running at port ${port}`)
})
In Windows Command-Prompt the syntax is 
>set PORT="8000"  
>echo %POST% 
 To get a list of all environment variables enter the command set To send those variables to a text file enter the command set > filename.txt

regexp

  1.  const string = 'Favorite GitHub repos: dupontdenis/bureauwindows dupontdenis/HTML_TD3 v8/v8.dev',

  2. regex = /\b(?<owner>[a-z0-9]+)\/(?<repo>[a-z0-9\.]+)\b/g;

  3. for (const match of string.matchAll(regex)){
  4.   console.log(`${match[0]} at ${match.index} with '${match.input}'`);
  5.   console.log(`owner: ${match.groups.owner}`);
  6.   console.log(`repo:  ${match.groups.repo}`)
  7. }