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}`)
})
>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